]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fuse: add setlease file operation
authorJeff Layton <jlayton@kernel.org>
Mon, 12 Jan 2026 13:01:21 +0000 (08:01 -0500)
committerChristian Brauner <brauner@kernel.org>
Tue, 13 Jan 2026 08:56:11 +0000 (09:56 +0100)
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>
Link: https://patch.msgid.link/20260112130121.25965-1-jlayton@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/fuse/file.c

index 01bc894e9c2baee49a9b8ddb7ab036244e574b37..2956f6cb598dfe00b0f4f46c1f5522b682d6b4f2 100644 (file)
@@ -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  = {