From 4313fff6377fb0c9f8389da2d5046f307301dd62 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 21 Oct 2007 16:42:11 -0700 Subject: [PATCH] --- yaml --- r: 71989 b: refs/heads/master c: 1305edad01d7327393ccecff8b9e976dd35bc55d h: refs/heads/master i: 71987: 18b48703fec641ee0402bb13b8fe1f250ea80caf v: v3 --- [refs] | 2 +- trunk/fs/fat/inode.c | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 36d17f035413..c3c8bbbc3176 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c38344fe9e73c99d546cc15a2bb97c7a09942aad +refs/heads/master: 1305edad01d7327393ccecff8b9e976dd35bc55d diff --git a/trunk/fs/fat/inode.c b/trunk/fs/fat/inode.c index c0c5e9c55b58..14d75fcaf2b7 100644 --- a/trunk/fs/fat/inode.c +++ b/trunk/fs/fat/inode.c @@ -653,24 +653,15 @@ static const struct super_operations fat_sops = { * of i_logstart is used to store the directory entry offset. */ -static struct dentry * -fat_decode_fh(struct super_block *sb, __u32 *fh, int len, int fhtype, - int (*acceptable)(void *context, struct dentry *de), - void *context) -{ - if (fhtype != 3) - return ERR_PTR(-ESTALE); - if (len < 5) - return ERR_PTR(-ESTALE); - - return sb->s_export_op->find_exported_dentry(sb, fh, NULL, acceptable, context); -} - -static struct dentry *fat_get_dentry(struct super_block *sb, void *inump) +static struct dentry *fat_fh_to_dentry(struct super_block *sb, + struct fid *fid, int fh_len, int fh_type) { struct inode *inode = NULL; struct dentry *result; - __u32 *fh = inump; + u32 *fh = fid->raw; + + if (fh_len < 5 || fh_type != 3) + return NULL; inode = iget(sb, fh[0]); if (!inode || is_bad_inode(inode) || inode->i_generation != fh[1]) { @@ -784,9 +775,8 @@ static struct dentry *fat_get_parent(struct dentry *child) } static struct export_operations fat_export_ops = { - .decode_fh = fat_decode_fh, .encode_fh = fat_encode_fh, - .get_dentry = fat_get_dentry, + .fh_to_dentry = fat_fh_to_dentry, .get_parent = fat_get_parent, };