diff options
| author | Jeff Layton <jlayton@kernel.org> | 2026-01-07 17:20:11 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-01-12 12:54:47 +0300 |
| commit | 5d65a70bd0437d2a7762164eb5015f6975937986 (patch) | |
| tree | 46612e745582083031d9d70fa53beb17c3dace88 | |
| parent | b9a9be4d3557b97303ac6c8b5e153b7ef569d886 (diff) | |
| download | linux-5d65a70bd0437d2a7762164eb5015f6975937986.tar.xz | |
9p: don't allow delegations to be set on directories
With the advent of directory leases, it's necessary to set the
->setlease() handler in directory file_operations to properly deny them.
Fixes: e6d28ebc17eb ("filelock: push the S_ISREG check down to ->setlease handlers")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260107-setlease-6-19-v1-3-85f034abcc57@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
| -rw-r--r-- | fs/9p/vfs_dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index e0d34e4e9076..af7f72abbb76 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -242,6 +242,7 @@ const struct file_operations v9fs_dir_operations = { .iterate_shared = v9fs_dir_readdir, .open = v9fs_file_open, .release = v9fs_dir_release, + .setlease = simple_nosetlease, }; const struct file_operations v9fs_dir_operations_dotl = { @@ -251,4 +252,5 @@ const struct file_operations v9fs_dir_operations_dotl = { .open = v9fs_file_open, .release = v9fs_dir_release, .fsync = v9fs_file_fsync_dotl, + .setlease = simple_nosetlease, }; |
