Skip to content

Commit 8a5511e

Browse files
jtlaytonbrauner
authored andcommitted
vboxsf: 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: e6d28eb ("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-6-85f034abcc57@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent ffb3210 commit 8a5511e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/vboxsf/dir.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ const struct file_operations vboxsf_dir_fops = {
186186
.release = vboxsf_dir_release,
187187
.read = generic_read_dir,
188188
.llseek = generic_file_llseek,
189+
.setlease = simple_nosetlease,
189190
};
190191

191192
/*

0 commit comments

Comments
 (0)