Commit 1305edad01d7327393ccecff8b9e976dd35bc55d
Committed by
Linus Torvalds
1 parent
c38344fe9e
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>
Showing 1 changed file with 7 additions and 17 deletions Side-by-side Diff
fs/fat/inode.c
... | ... | @@ -653,25 +653,16 @@ |
653 | 653 | * of i_logstart is used to store the directory entry offset. |
654 | 654 | */ |
655 | 655 | |
656 | -static struct dentry * | |
657 | -fat_decode_fh(struct super_block *sb, __u32 *fh, int len, int fhtype, | |
658 | - int (*acceptable)(void *context, struct dentry *de), | |
659 | - void *context) | |
656 | +static struct dentry *fat_fh_to_dentry(struct super_block *sb, | |
657 | + struct fid *fid, int fh_len, int fh_type) | |
660 | 658 | { |
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 | - | |
669 | -static struct dentry *fat_get_dentry(struct super_block *sb, void *inump) | |
670 | -{ | |
671 | 659 | struct inode *inode = NULL; |
672 | 660 | struct dentry *result; |
673 | - __u32 *fh = inump; | |
661 | + u32 *fh = fid->raw; | |
674 | 662 | |
663 | + if (fh_len < 5 || fh_type != 3) | |
664 | + return NULL; | |
665 | + | |
675 | 666 | inode = iget(sb, fh[0]); |
676 | 667 | if (!inode || is_bad_inode(inode) || inode->i_generation != fh[1]) { |
677 | 668 | if (inode) |
678 | 669 | |
... | ... | @@ -784,9 +775,8 @@ |
784 | 775 | } |
785 | 776 | |
786 | 777 | static struct export_operations fat_export_ops = { |
787 | - .decode_fh = fat_decode_fh, | |
788 | 778 | .encode_fh = fat_encode_fh, |
789 | - .get_dentry = fat_get_dentry, | |
779 | + .fh_to_dentry = fat_fh_to_dentry, | |
790 | 780 | .get_parent = fat_get_parent, |
791 | 781 | }; |
792 | 782 |