summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2026-01-08 20:12:57 +0300
committerChristian Brauner <brauner@kernel.org>2026-01-12 12:55:45 +0300
commit663cdef61a27bf593e48cedc37f28ed5cfbf8c11 (patch)
treee023b0c8569adfe0f5247f80c2cbd2b97419ac06
parentca4388bf1d9e1daa849ea0550b83a6566e65502a (diff)
downloadlinux-663cdef61a27bf593e48cedc37f28ed5cfbf8c11.tar.xz
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 <jlayton@kernel.org> Link: https://patch.msgid.link/20260108-setlease-6-20-v1-2-ea4dec9b67fa@kernel.org Acked-by: David Sterba <dsterba@suse.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--fs/affs/dir.c2
-rw-r--r--fs/affs/file.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index bd40d5f08810..fe18caaf4d65 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -15,6 +15,7 @@
*/
#include <linux/iversion.h>
+#include <linux/filelock.h>
#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 765c3443663e..6c9258359ddb 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -15,6 +15,7 @@
#include <linux/uio.h>
#include <linux/blkdev.h>
+#include <linux/filelock.h>
#include <linux/mpage.h>
#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 = {