Skip to content

Commit ce946c4

Browse files
jtlaytonbrauner
authored andcommitted
gfs2: 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. In the "nolock" case however, there is no need to 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-4-85f034abcc57@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 5d65a70 commit ce946c4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/gfs2/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,7 @@ const struct file_operations gfs2_dir_fops = {
16081608
.lock = gfs2_lock,
16091609
.flock = gfs2_flock,
16101610
.llseek = default_llseek,
1611+
.setlease = simple_nosetlease,
16111612
.fop_flags = FOP_ASYNC_LOCK,
16121613
};
16131614

0 commit comments

Comments
 (0)