diff options
Diffstat (limited to 'fs/exportfs/expfs.c')
-rw-r--r-- | fs/exportfs/expfs.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index dd132bb7b8f8..db86006956b0 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/fs.h> | 3 | #include <linux/fs.h> |
4 | #include <linux/file.h> | 4 | #include <linux/file.h> |
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/mount.h> | ||
6 | #include <linux/namei.h> | 7 | #include <linux/namei.h> |
7 | 8 | ||
8 | struct export_operations export_op_default; | 9 | struct export_operations export_op_default; |
@@ -468,6 +469,26 @@ static struct dentry *export_decode_fh(struct super_block *sb, __u32 *fh, int fh | |||
468 | acceptable, context); | 469 | acceptable, context); |
469 | } | 470 | } |
470 | 471 | ||
472 | int exportfs_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, | ||
473 | int connectable) | ||
474 | { | ||
475 | struct export_operations *nop = dentry->d_sb->s_export_op; | ||
476 | |||
477 | return CALL(nop, encode_fh)(dentry, fh, max_len, connectable); | ||
478 | } | ||
479 | EXPORT_SYMBOL_GPL(exportfs_encode_fh); | ||
480 | |||
481 | struct dentry *exportfs_decode_fh(struct vfsmount *mnt, __u32 *fh, int fh_len, | ||
482 | int fileid_type, int (*acceptable)(void *, struct dentry *), | ||
483 | void *context) | ||
484 | { | ||
485 | struct export_operations *nop = mnt->mnt_sb->s_export_op; | ||
486 | |||
487 | return CALL(nop, decode_fh)(mnt->mnt_sb, fh, fh_len, fileid_type, | ||
488 | acceptable, context); | ||
489 | } | ||
490 | EXPORT_SYMBOL_GPL(exportfs_decode_fh); | ||
491 | |||
471 | struct export_operations export_op_default = { | 492 | struct export_operations export_op_default = { |
472 | .decode_fh = export_decode_fh, | 493 | .decode_fh = export_decode_fh, |
473 | .encode_fh = export_encode_fh, | 494 | .encode_fh = export_encode_fh, |
@@ -477,7 +498,6 @@ struct export_operations export_op_default = { | |||
477 | .get_dentry = get_dentry, | 498 | .get_dentry = get_dentry, |
478 | }; | 499 | }; |
479 | 500 | ||
480 | EXPORT_SYMBOL(export_op_default); | ||
481 | EXPORT_SYMBOL(find_exported_dentry); | 501 | EXPORT_SYMBOL(find_exported_dentry); |
482 | 502 | ||
483 | MODULE_LICENSE("GPL"); | 503 | MODULE_LICENSE("GPL"); |