mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
ceph: 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: 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-5-85f034abcc57@kernel.org
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
ce946c4fb9
commit
ffb321045b
@@ -2214,6 +2214,7 @@ const struct file_operations ceph_dir_fops = {
|
||||
.fsync = ceph_fsync,
|
||||
.lock = ceph_lock,
|
||||
.flock = ceph_flock,
|
||||
.setlease = simple_nosetlease,
|
||||
};
|
||||
|
||||
const struct file_operations ceph_snapdir_fops = {
|
||||
@@ -2221,6 +2222,7 @@ const struct file_operations ceph_snapdir_fops = {
|
||||
.llseek = ceph_dir_llseek,
|
||||
.open = ceph_open,
|
||||
.release = ceph_release,
|
||||
.setlease = simple_nosetlease,
|
||||
};
|
||||
|
||||
const struct inode_operations ceph_dir_iops = {
|
||||
|
||||
Reference in New Issue
Block a user