From: Jeff Layton <jlayton@kernel.org>
To: brauner@kernel.org
Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org, jack@suse.com,
viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org
Subject: [PATCH] fuse: add setlease file operation
Date: Mon, 12 Jan 2026 08:01:21 -0500 [thread overview]
Message-ID: <20260112130121.25965-1-jlayton@kernel.org> (raw)
Add the setlease file_operation to fuse_file_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>
---
As Jan pointed out in review, this patch is also needed in the
vfs-7.0.leases branch, as I missed FUSE. Can you drop this patch on top
of that branch, preferably ahead of the patch that changes
kernel_setlease()? Let me know if you'd rather I resend the whole pile.
fs/fuse/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 01bc894e9c2b..2956f6cb598d 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -3177,6 +3177,7 @@ static const struct file_operations fuse_file_operations = {
.poll = fuse_file_poll,
.fallocate = fuse_file_fallocate,
.copy_file_range = fuse_copy_file_range,
+ .setlease = generic_setlease,
};
static const struct address_space_operations fuse_file_aops = {
--
2.52.0
next reply other threads:[~2026-01-12 13:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 13:01 Jeff Layton [this message]
2026-01-13 8:56 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260112130121.25965-1-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=brauner@kernel.org \
--cc=jack@suse.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®