]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: add setlease file operation
authorJeff Layton <jlayton@kernel.org>
Thu, 8 Jan 2026 17:12:58 +0000 (12:12 -0500)
committerChristian Brauner <brauner@kernel.org>
Mon, 12 Jan 2026 09:55:45 +0000 (10:55 +0100)
commitf9688474e413f607f1a4e047d970b50dc268c84c
tree50cd6ab477697464a77d41891524014ae21b10b0
parent663cdef61a27bf593e48cedc37f28ed5cfbf8c11
btrfs: add setlease file operation

Add the setlease file_operation to btrfs_file_operations and
btrfs_dir_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/20260108-setlease-6-20-v1-3-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>
fs/btrfs/file.c
fs/btrfs/inode.c