]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
9p: explicitly deny setlease attempts
authorJeff Layton <jlayton@kernel.org>
Tue, 19 Mar 2024 16:34:45 +0000 (12:34 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:14:48 +0000 (12:14 +0200)
[ Upstream commit 7a84602297d36617dbdadeba55a2567031e5165b ]

9p is a remote network protocol, and it doesn't support asynchronous
notifications from the server. Ensure that we don't hand out any leases
since we can't guarantee they'll be broken when a file's contents
change.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/9p/vfs_file.c

index bae330c2f0cf07d207af8c193dad15a78703793a..a504240c818c86ff0a037e706d48e55e5e419ce9 100644 (file)
@@ -520,6 +520,7 @@ const struct file_operations v9fs_file_operations = {
        .splice_read = v9fs_file_splice_read,
        .splice_write = iter_file_splice_write,
        .fsync = v9fs_file_fsync,
+       .setlease = simple_nosetlease,
 };
 
 const struct file_operations v9fs_file_operations_dotl = {
@@ -534,4 +535,5 @@ const struct file_operations v9fs_file_operations_dotl = {
        .splice_read = v9fs_file_splice_read,
        .splice_write = iter_file_splice_write,
        .fsync = v9fs_file_fsync_dotl,
+       .setlease = simple_nosetlease,
 };