summaryrefslogtreecommitdiff
path: root/include/linux/exportfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/exportfs.h')
-rw-r--r--include/linux/exportfs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index 5b3c9f30b422..85bd027494e5 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -235,7 +235,7 @@ extern int exportfs_encode_fh(struct dentry *dentry, struct fid *fid,
static inline bool exportfs_can_encode_fid(const struct export_operations *nop)
{
- return nop;
+ return nop && nop->encode_fh;
}
static inline bool exportfs_can_decode_fh(const struct export_operations *nop)
@@ -279,6 +279,13 @@ extern struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
/*
* Generic helpers for filesystems.
*/
+#ifdef CONFIG_EXPORTFS
+int generic_encode_ino32_fh(struct inode *inode, __u32 *fh, int *max_len,
+ struct inode *parent);
+#else
+#define generic_encode_ino32_fh NULL
+#endif
+
extern struct dentry *generic_fh_to_dentry(struct super_block *sb,
struct fid *fid, int fh_len, int fh_type,
struct inode *(*get_inode) (struct super_block *sb, u64 ino, u32 gen));