diff options
author | Amir Goldstein <amir73il@gmail.com> | 2023-10-23 20:07:58 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-10-24 17:57:45 +0200 |
commit | 66c62769bcf6aa142e2309278980a2e52f4b08db (patch) | |
tree | fbe1385b834c7bf57b87655684bdba6cfdc67634 /fs/nfsd/export.c | |
parent | Linux 6.6-rc7 (diff) | |
download | linux-66c62769bcf6aa142e2309278980a2e52f4b08db.tar.xz linux-66c62769bcf6aa142e2309278980a2e52f4b08db.zip |
exportfs: add helpers to check if filesystem can encode/decode file handles
The logic of whether filesystem can encode/decode file handles is open
coded in many places.
In preparation to changing the logic, move the open coded logic into
inline helpers.
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20231023180801.2953446-2-amir73il@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r-- | fs/nfsd/export.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 11a0eaa2f914..dc99dfc1d411 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -421,8 +421,7 @@ static int check_export(struct path *path, int *flags, unsigned char *uuid) return -EINVAL; } - if (!inode->i_sb->s_export_op || - !inode->i_sb->s_export_op->fh_to_dentry) { + if (!exportfs_can_decode_fh(inode->i_sb->s_export_op)) { dprintk("exp_export: export of invalid fs type.\n"); return -EINVAL; } |