exportfs: add helpers to check if filesystem can encode/decode file handles
authorAmir Goldstein <amir73il@gmail.com>
Mon, 23 Oct 2023 18:07:58 +0000 (21:07 +0300)
committerChristian Brauner <brauner@kernel.org>
Tue, 24 Oct 2023 15:57:45 +0000 (17:57 +0200)
commit66c62769bcf6aa142e2309278980a2e52f4b08db
treefbe1385b834c7bf57b87655684bdba6cfdc67634
parent05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1
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>
fs/exportfs/expfs.c
fs/fhandle.c
fs/nfsd/export.c
fs/notify/fanotify/fanotify_user.c
fs/overlayfs/util.c
include/linux/exportfs.h