From: Jeff Layton Date: Thu, 8 Jan 2026 17:12:57 +0000 (-0500) Subject: affs: add setlease file operation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=663cdef61a27bf593e48cedc37f28ed5cfbf8c11;p=thirdparty%2Fkernel%2Flinux.git affs: add setlease file operation Add the setlease file_operation to affs_file_operations and affs_dir_operations, pointing to generic_setlease. A future patch will change the default behavior to reject lease attempts with -EINVAL when there is no setlease file operation defined. Add generic_setlease to retain the ability to set leases on this filesystem. Signed-off-by: Jeff Layton Link: https://patch.msgid.link/20260108-setlease-6-20-v1-2-ea4dec9b67fa@kernel.org Acked-by: David Sterba Acked-by: Al Viro Acked-by: Christoph Hellwig Signed-off-by: Christian Brauner --- diff --git a/fs/affs/dir.c b/fs/affs/dir.c index bd40d5f088104..fe18caaf4d655 100644 --- a/fs/affs/dir.c +++ b/fs/affs/dir.c @@ -15,6 +15,7 @@ */ #include +#include #include "affs.h" struct affs_dir_data { @@ -55,6 +56,7 @@ const struct file_operations affs_dir_operations = { .iterate_shared = affs_readdir, .fsync = affs_file_fsync, .release = affs_dir_release, + .setlease = generic_setlease, }; /* diff --git a/fs/affs/file.c b/fs/affs/file.c index 765c3443663e6..6c9258359ddb9 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c @@ -15,6 +15,7 @@ #include #include +#include #include #include "affs.h" @@ -1008,6 +1009,7 @@ const struct file_operations affs_file_operations = { .release = affs_file_release, .fsync = affs_file_fsync, .splice_read = filemap_splice_read, + .setlease = generic_setlease, }; const struct inode_operations affs_file_inode_operations = {