]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
filelock: default to returning -EINVAL when ->setlease operation is NULL
authorJeff Layton <jlayton@kernel.org>
Thu, 8 Jan 2026 17:13:18 +0000 (12:13 -0500)
committerChristian Brauner <brauner@kernel.org>
Mon, 12 Jan 2026 09:55:48 +0000 (10:55 +0100)
commit2b10994be716b07d881ad0f966d6a4bb13b20750
treeabbaf5bd9086af7bb8ed7c345724499107fe676a
parent6163b5da2f5eff5fdad6bad9fa1ca37c7d2d0d5d
filelock: default to returning -EINVAL when ->setlease operation is NULL

Now that most filesystems where we expect to need lease support have
their ->setlease() operations explicitly set, change kernel_setlease()
to return -EINVAL when the setlease is a NULL pointer.

Also update the Documentation/ with info about this change.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260108-setlease-6-20-v1-23-ea4dec9b67fa@kernel.org
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Documentation/filesystems/porting.rst
Documentation/filesystems/vfs.rst
fs/locks.c