|
@@ -447,6 +447,24 @@ done:
|
|
|
return retval;
|
|
return retval;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+static struct dentry *affs_get_parent(struct dentry *child)
|
|
|
|
|
+{
|
|
|
|
|
+ struct inode *parent;
|
|
|
|
|
+ struct buffer_head *bh;
|
|
|
|
|
+
|
|
|
|
|
+ bh = affs_bread(child->d_sb, d_inode(child)->i_ino);
|
|
|
|
|
+ if (!bh)
|
|
|
|
|
+ return ERR_PTR(-EIO);
|
|
|
|
|
+
|
|
|
|
|
+ parent = affs_iget(child->d_sb,
|
|
|
|
|
+ be32_to_cpu(AFFS_TAIL(child->d_sb, bh)->parent));
|
|
|
|
|
+ brelse(bh);
|
|
|
|
|
+ if (IS_ERR(parent))
|
|
|
|
|
+ return ERR_CAST(parent);
|
|
|
|
|
+
|
|
|
|
|
+ return d_obtain_alias(parent);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
static struct inode *affs_nfs_get_inode(struct super_block *sb, u64 ino,
|
|
static struct inode *affs_nfs_get_inode(struct super_block *sb, u64 ino,
|
|
|
u32 generation)
|
|
u32 generation)
|
|
|
{
|
|
{
|
|
@@ -484,6 +502,7 @@ static struct dentry *affs_fh_to_parent(struct super_block *sb, struct fid *fid,
|
|
|
const struct export_operations affs_export_ops = {
|
|
const struct export_operations affs_export_ops = {
|
|
|
.fh_to_dentry = affs_fh_to_dentry,
|
|
.fh_to_dentry = affs_fh_to_dentry,
|
|
|
.fh_to_parent = affs_fh_to_parent,
|
|
.fh_to_parent = affs_fh_to_parent,
|
|
|
|
|
+ .get_parent = affs_get_parent,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const struct dentry_operations affs_dentry_operations = {
|
|
const struct dentry_operations affs_dentry_operations = {
|