summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2024-03-19 19:34:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-17 12:43:52 +0300
commitf633cf1da1ad3b06b00fda044dd6327588f7b989 (patch)
tree7a63792029f1992f04cf20d4b4c7c869c3df5aa3
parent09335c69daa48d930779f4f951d4fcde3c7f67ab (diff)
downloadlinux-f633cf1da1ad3b06b00fda044dd6327588f7b989.tar.xz
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>
-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 ee9cabac1204..14d6cb031621 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -676,6 +676,7 @@ const struct file_operations v9fs_file_operations = {
.lock = v9fs_file_lock,
.mmap = generic_file_readonly_mmap,
.fsync = v9fs_file_fsync,
+ .setlease = simple_nosetlease,
};
const struct file_operations v9fs_file_operations_dotl = {
@@ -711,4 +712,5 @@ const struct file_operations v9fs_mmap_file_operations_dotl = {
.flock = v9fs_file_flock_dotl,
.mmap = v9fs_mmap_file_mmap,
.fsync = v9fs_file_fsync_dotl,
+ .setlease = simple_nosetlease,
};