From 7dd596bb35e579916576677b51c15171012a7854 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Thu, 8 Jan 2026 12:13:07 -0500 Subject: [PATCH] jfs: add setlease file operation Add the setlease file_operation to jfs_file_operations and jfs_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-12-ea4dec9b67fa@kernel.org Acked-by: Richard Weinberger Acked-by: Al Viro Acked-by: Christoph Hellwig Reviewed-by: Dave Kleikamp Signed-off-by: Christian Brauner --- fs/jfs/file.c | 2 ++ fs/jfs/namei.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fs/jfs/file.c b/fs/jfs/file.c index 87ad042221e78..246568cb9a6ec 100644 --- a/fs/jfs/file.c +++ b/fs/jfs/file.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include "jfs_incore.h" @@ -153,4 +154,5 @@ const struct file_operations jfs_file_operations = { .release = jfs_release, .unlocked_ioctl = jfs_ioctl, .compat_ioctl = compat_ptr_ioctl, + .setlease = generic_setlease, }; diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 65a218eba8faf..f7e2ae7a4c37e 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -1545,6 +1546,7 @@ const struct file_operations jfs_dir_operations = { .unlocked_ioctl = jfs_ioctl, .compat_ioctl = compat_ptr_ioctl, .llseek = generic_file_llseek, + .setlease = generic_setlease, }; static int jfs_ci_hash(const struct dentry *dir, struct qstr *this) -- 2.47.3