summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-10-21 16:42:11 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-22 08:13:20 -0700
commit1305edad01d7327393ccecff8b9e976dd35bc55d (patch)
tree1ed0fd064b555d201873cfec1ba347cf91869759
parentc38344fe9e73c99d546cc15a2bb97c7a09942aad (diff)
downloadop-kernel-dev-1305edad01d7327393ccecff8b9e976dd35bc55d.zip
op-kernel-dev-1305edad01d7327393ccecff8b9e976dd35bc55d.tar.gz
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>
-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 c0c5e9c..14d75fc 100644
--- a/fs/fat/inode.c
+++ b/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 @@ out:
}
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,
};
OpenPOWER on IntegriCloud