exportfs: make ->encode_fh() a mandatory method for NFS export
authorAmir Goldstein <amir73il@gmail.com>
Mon, 23 Oct 2023 18:07:59 +0000 (21:07 +0300)
committerChristian Brauner <brauner@kernel.org>
Sat, 28 Oct 2023 14:15:15 +0000 (16:15 +0200)
commite21fc2038c1b978b89bbc3d45a4c5c6ef598e178
treec649b5c855ca7fcc5b440fe57c3f64c56ec768aa
parent66c62769bcf6aa142e2309278980a2e52f4b08db
exportfs: make ->encode_fh() a mandatory method for NFS export

Rename the default helper for encoding FILEID_INO32_GEN* file handles to
generic_encode_ino32_fh() and convert the filesystems that used the
default implementation to use the generic helper explicitly.

After this change, exportfs_encode_inode_fh() no longer has a default
implementation to encode FILEID_INO32_GEN* file handles.

This is a step towards allowing filesystems to encode non-decodeable
file handles for fanotify without having to implement any
export_operations.

Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20231023180801.2953446-3-amir73il@gmail.com
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
19 files changed:
Documentation/filesystems/nfs/exporting.rst
Documentation/filesystems/porting.rst
fs/affs/namei.c
fs/befs/linuxvfs.c
fs/efs/super.c
fs/erofs/super.c
fs/exportfs/expfs.c
fs/ext2/super.c
fs/ext4/super.c
fs/f2fs/super.c
fs/fat/nfs.c
fs/jffs2/super.c
fs/jfs/super.c
fs/ntfs/namei.c
fs/ntfs3/super.c
fs/smb/client/export.c
fs/squashfs/export.c
fs/ufs/super.c
include/linux/exportfs.h