aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat/inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-10-21 19:42:11 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-22 11:13:20 -0400
commit1305edad01d7327393ccecff8b9e976dd35bc55d (patch)
tree1ed0fd064b555d201873cfec1ba347cf91869759 /fs/fat/inode.c
parentc38344fe9e73c99d546cc15a2bb97c7a09942aad (diff)
fat: new export ops
Very little changes here, fat had a mostly no op decode_fh before and does not store any parent information. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Neil Brown <neilb@suse.de> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat/inode.c')
-rw-r--r--fs/fat/inode.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index c0c5e9c55b5..14d75fcaf2b 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -653,24 +653,15 @@ static const struct super_operations fat_sops = {
653 * of i_logstart is used to store the directory entry offset. 653 * of i_logstart is used to store the directory entry offset.
654 */ 654 */
655 655
656static struct dentry * 656static struct dentry *fat_fh_to_dentry(struct super_block *sb,
657fat_decode_fh(struct super_block *sb, __u32 *fh, int len, int fhtype, 657 struct fid *fid, int fh_len, int fh_type)
658 int (*acceptable)(void *context, struct dentry *de),
659 void *context)
660{
661 if (fhtype != 3)
662 return ERR_PTR(-ESTALE);
663 if (len < 5)
664 return ERR_PTR(-ESTALE);
665
666 return sb->s_export_op->find_exported_dentry(sb, fh, NULL, acceptable, context);
667}
668
669static struct dentry *fat_get_dentry(struct super_block *sb, void *inump)
670{ 658{
671 struct inode *inode = NULL; 659 struct inode *inode = NULL;
672 struct dentry *result; 660 struct dentry *result;
673 __u32 *fh = inump; 661 u32 *fh = fid->raw;
662
663 if (fh_len < 5 || fh_type != 3)
664 return NULL;
674 665
675 inode = iget(sb, fh[0]); 666 inode = iget(sb, fh[0]);
676 if (!inode || is_bad_inode(inode) || inode->i_generation != fh[1]) { 667 if (!inode || is_bad_inode(inode) || inode->i_generation != fh[1]) {
@@ -784,9 +775,8 @@ out:
784} 775}
785 776
786static struct export_operations fat_export_ops = { 777static struct export_operations fat_export_ops = {
787 .decode_fh = fat_decode_fh,
788 .encode_fh = fat_encode_fh, 778 .encode_fh = fat_encode_fh,
789 .get_dentry = fat_get_dentry, 779 .fh_to_dentry = fat_fh_to_dentry,
790 .get_parent = fat_get_parent, 780 .get_parent = fat_get_parent,
791}; 781};
792 782