summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2024-03-19 12:34:45 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-17 11:56:09 +0200
commitf3b0226fc9f49a1b953b59581c714246378e0964 (patch)
treee154d2398403781e1478d57a8efec0bb8450eabd /fs/9p
parent5d74f4d80ad9b8f4fb72c03b05e8617fb8d64ec5 (diff)
downloadlinux-f3b0226fc9f49a1b953b59581c714246378e0964.tar.gz
linux-f3b0226fc9f49a1b953b59581c714246378e0964.tar.bz2
linux-f3b0226fc9f49a1b953b59581c714246378e0964.zip
9p: explicitly deny setlease attempts
[ 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>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index aec43ba83799..87222067fe5d 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -667,6 +667,7 @@ const struct file_operations v9fs_file_operations = {
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync,
+ .setlease = simple_nosetlease,
};
const struct file_operations v9fs_file_operations_dotl = {
@@ -708,4 +709,5 @@ const struct file_operations v9fs_mmap_file_operations_dotl = {
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync_dotl,
+ .setlease = simple_nosetlease,
};