summaryrefslogtreecommitdiffstats
path: root/fs/fhandle.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--fs/fhandle.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/fhandle.c b/fs/fhandle.c
index 6ea8d35a93..18b3ba8dc8 100644
--- a/fs/fhandle.c
+++ b/fs/fhandle.c
@@ -26,12 +26,8 @@ static long do_sys_name_to_handle(const struct path *path,
/*
* We need to make sure whether the file system support decoding of
* the file handle if decodeable file handle was requested.
- * Otherwise, even empty export_operations are sufficient to opt-in
- * to encoding FIDs.
*/
- if (!path->dentry->d_sb->s_export_op ||
- (!(fh_flags & EXPORT_FH_FID) &&
- !path->dentry->d_sb->s_export_op->fh_to_dentry))
+ if (!exportfs_can_encode_fh(path->dentry->d_sb->s_export_op, fh_flags))
return -EOPNOTSUPP;
if (copy_from_user(&f_handle, ufh, sizeof(struct file_handle)))