Commit 1305edad authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

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: default avatarChristoph 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c38344fe
...@@ -653,24 +653,15 @@ static const struct super_operations fat_sops = { ...@@ -653,24 +653,15 @@ static const struct super_operations fat_sops = {
* of i_logstart is used to store the directory entry offset. * of i_logstart is used to store the directory entry offset.
*/ */
static struct dentry * static struct dentry *fat_fh_to_dentry(struct super_block *sb,
fat_decode_fh(struct super_block *sb, __u32 *fh, int len, int fhtype, struct fid *fid, int fh_len, int fh_type)
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)
{ {
struct inode *inode = NULL; struct inode *inode = NULL;
struct dentry *result; struct dentry *result;
__u32 *fh = inump; u32 *fh = fid->raw;
if (fh_len < 5 || fh_type != 3)
return NULL;
inode = iget(sb, fh[0]); inode = iget(sb, fh[0]);
if (!inode || is_bad_inode(inode) || inode->i_generation != fh[1]) { if (!inode || is_bad_inode(inode) || inode->i_generation != fh[1]) {
...@@ -784,9 +775,8 @@ static struct dentry *fat_get_parent(struct dentry *child) ...@@ -784,9 +775,8 @@ static struct dentry *fat_get_parent(struct dentry *child)
} }
static struct export_operations fat_export_ops = { static struct export_operations fat_export_ops = {
.decode_fh = fat_decode_fh,
.encode_fh = fat_encode_fh, .encode_fh = fat_encode_fh,
.get_dentry = fat_get_dentry, .fh_to_dentry = fat_fh_to_dentry,
.get_parent = fat_get_parent, .get_parent = fat_get_parent,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment