summaryrefslogtreecommitdiffstats
path: root/fs/befs/linuxvfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/befs/linuxvfs.c')
-rw-r--r--fs/befs/linuxvfs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index c500e954debb..63e7c4760bfb 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -58,6 +58,7 @@ static struct dentry *befs_fh_to_dentry(struct super_block *sb,
58 struct fid *fid, int fh_len, int fh_type); 58 struct fid *fid, int fh_len, int fh_type);
59static struct dentry *befs_fh_to_parent(struct super_block *sb, 59static struct dentry *befs_fh_to_parent(struct super_block *sb,
60 struct fid *fid, int fh_len, int fh_type); 60 struct fid *fid, int fh_len, int fh_type);
61static struct dentry *befs_get_parent(struct dentry *child);
61 62
62static const struct super_operations befs_sops = { 63static const struct super_operations befs_sops = {
63 .alloc_inode = befs_alloc_inode, /* allocate a new inode */ 64 .alloc_inode = befs_alloc_inode, /* allocate a new inode */
@@ -93,6 +94,7 @@ static const struct address_space_operations befs_symlink_aops = {
93static const struct export_operations befs_export_operations = { 94static const struct export_operations befs_export_operations = {
94 .fh_to_dentry = befs_fh_to_dentry, 95 .fh_to_dentry = befs_fh_to_dentry,
95 .fh_to_parent = befs_fh_to_parent, 96 .fh_to_parent = befs_fh_to_parent,
97 .get_parent = befs_get_parent,
96}; 98};
97 99
98/* 100/*
@@ -667,6 +669,19 @@ static struct dentry *befs_fh_to_parent(struct super_block *sb,
667 befs_nfs_get_inode); 669 befs_nfs_get_inode);
668} 670}
669 671
672static struct dentry *befs_get_parent(struct dentry *child)
673{
674 struct inode *parent;
675 struct befs_inode_info *befs_ino = BEFS_I(d_inode(child));
676
677 parent = befs_iget(child->d_sb,
678 (unsigned long)befs_ino->i_parent.start);
679 if (IS_ERR(parent))
680 return ERR_CAST(parent);
681
682 return d_obtain_alias(parent);
683}
684
670enum { 685enum {
671 Opt_uid, Opt_gid, Opt_charset, Opt_debug, Opt_err, 686 Opt_uid, Opt_gid, Opt_charset, Opt_debug, Opt_err,
672}; 687};