mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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: e6d28ebc17 ("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>
This commit is contained in:
parent
5d65a70bd0
commit
ce946c4fb9
|
|
@ -1608,6 +1608,7 @@ const struct file_operations gfs2_dir_fops = {
|
|||
.lock = gfs2_lock,
|
||||
.flock = gfs2_flock,
|
||||
.llseek = default_llseek,
|
||||
.setlease = simple_nosetlease,
|
||||
.fop_flags = FOP_ASYNC_LOCK,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user