aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-10-21 19:42:08 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-22 11:13:20 -0400
commit1b961ac05a1624ac2883ec31a3601de7eb30ebdd (patch)
tree06ecfcb552d7610ac45e4c770c64625432a48d78 /fs/ext4
parent74af0baad4fd44cc4412cc210d6d9b6fdf7be8da (diff)
ext4: new export ops
Trivial switch over to the new generic helpers. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Neil Brown <neilb@suse.de> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b11e9e2bcd01..9f0d37a4c4df 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -686,13 +686,10 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)
686} 686}
687 687
688 688
689static struct dentry *ext4_get_dentry(struct super_block *sb, void *vobjp) 689static struct inode *ext4_nfs_get_inode(struct super_block *sb,
690 u64 ino, u32 generation)
690{ 691{
691 __u32 *objp = vobjp;
692 unsigned long ino = objp[0];
693 __u32 generation = objp[1];
694 struct inode *inode; 692 struct inode *inode;
695 struct dentry *result;
696 693
697 if (ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO) 694 if (ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO)
698 return ERR_PTR(-ESTALE); 695 return ERR_PTR(-ESTALE);
@@ -715,15 +712,22 @@ static struct dentry *ext4_get_dentry(struct super_block *sb, void *vobjp)
715 iput(inode); 712 iput(inode);
716 return ERR_PTR(-ESTALE); 713 return ERR_PTR(-ESTALE);
717 } 714 }
718 /* now to find a dentry. 715
719 * If possible, get a well-connected one 716 return inode;
720 */ 717}
721 result = d_alloc_anon(inode); 718
722 if (!result) { 719static struct dentry *ext4_fh_to_dentry(struct super_block *sb, struct fid *fid,
723 iput(inode); 720 int fh_len, int fh_type)
724 return ERR_PTR(-ENOMEM); 721{
725 } 722 return generic_fh_to_dentry(sb, fid, fh_len, fh_type,
726 return result; 723 ext4_nfs_get_inode);
724}
725
726static struct dentry *ext4_fh_to_parent(struct super_block *sb, struct fid *fid,
727 int fh_len, int fh_type)
728{
729 return generic_fh_to_parent(sb, fid, fh_len, fh_type,
730 ext4_nfs_get_inode);
727} 731}
728 732
729#ifdef CONFIG_QUOTA 733#ifdef CONFIG_QUOTA
@@ -793,8 +797,9 @@ static const struct super_operations ext4_sops = {
793}; 797};
794 798
795static struct export_operations ext4_export_ops = { 799static struct export_operations ext4_export_ops = {
800 .fh_to_dentry = ext4_fh_to_dentry,
801 .fh_to_parent = ext4_fh_to_parent,
796 .get_parent = ext4_get_parent, 802 .get_parent = ext4_get_parent,
797 .get_dentry = ext4_get_dentry,
798}; 803};
799 804
800enum { 805enum {