[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <591f69efdf89ba02c36b042faa3486eca0cec76d.camel@redhat.com>
Date: Wed, 07 Jan 2026 12:02:49 -0800
From: Viacheslav Dubeyko <vdubeyko@...hat.com>
To: Jeff Layton <jlayton@...nel.org>, Christian Brauner
<brauner@...nel.org>, Al Viro <viro@...iv.linux.org.uk>, Jan Kara
<jack@...e.cz>, Steve French <sfrench@...ba.org>, Paulo Alcantara
<pc@...guebit.org>, Ronnie Sahlberg <ronniesahlberg@...il.com>, Shyam
Prasad N <sprasad@...rosoft.com>, Tom Talpey <tom@...pey.com>, Bharath SM
<bharathsm@...rosoft.com>, Trond Myklebust <trondmy@...nel.org>, Anna
Schumaker <anna@...nel.org>, Eric Van Hensbergen <ericvh@...nel.org>,
Latchesar Ionkov <lucho@...kov.net>, Dominique Martinet
<asmadeus@...ewreck.org>, Christian Schoenebeck <linux_oss@...debyte.com>,
Andreas Gruenbacher <agruenba@...hat.com>, Xiubo Li <xiubli@...hat.com>,
Ilya Dryomov <idryomov@...il.com>, Hans de Goede <hansg@...nel.org>,
NeilBrown <neil@...wn.name>
Cc: Christoph Hellwig <hch@...radead.org>, linux-cifs@...r.kernel.org,
samba-technical@...ts.samba.org, linux-kernel@...r.kernel.org,
linux-nfs@...r.kernel.org, v9fs@...ts.linux.dev, gfs2@...ts.linux.dev,
ceph-devel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [EXTERNAL] [PATCH 5/6] ceph: don't allow delegations to be set
on directories
On Wed, 2026-01-07 at 09:20 -0500, Jeff Layton wrote:
> 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@...nel.org>
> ---
> fs/ceph/dir.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
> index 86d7aa594ea99335af3e91a95c0a418fdc1b8a8a..804588524cd570078ba59bf38d2460950ca67daf 100644
> --- a/fs/ceph/dir.c
> +++ b/fs/ceph/dir.c
> @@ -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 = {
Looks good.
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@....com>
Thanks,
Slava.
Powered by blists - more mailing lists