aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 c0c5e9c55b58..14d75fcaf2b7 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