* [PATCH 1/6] nfs: properly disallow delegation requests on directories
2026-01-07 14:20 [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Jeff Layton
@ 2026-01-07 14:20 ` Jeff Layton
2026-01-08 9:24 ` Christoph Hellwig
2026-01-07 14:20 ` [PATCH 2/6] smb/client: properly disallow delegations " Jeff Layton
` (6 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Jeff Layton @ 2026-01-07 14:20 UTC (permalink / raw)
To: Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown
Cc: Christoph Hellwig, linux-cifs, samba-technical, linux-kernel,
linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel, Jeff Layton
Checking for S_ISREG() in nfs4_setlease() is incorrect, since that op is
never called for directories. The right way to deny lease requests on
directories is to set the ->setlease() operation to simple_nosetlease()
in the directory file_operations.
Fixes: e6d28ebc17eb ("filelock: push the S_ISREG check down to ->setlease handlers")
Reported-by: Christoph Hellwig <hch@infradead.org>
Closes: https://lore.kernel.org/linux-fsdevel/aV316LhsVSl0n9-E@infradead.org/
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfs/dir.c | 1 +
fs/nfs/nfs4file.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 23a78a742b619dea8b76ddf28f4f59a1c8a015e2..71df279febf797880ded19e45528c3df4cea2dde 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -66,6 +66,7 @@ const struct file_operations nfs_dir_operations = {
.open = nfs_opendir,
.release = nfs_closedir,
.fsync = nfs_fsync_dir,
+ .setlease = simple_nosetlease,
};
const struct address_space_operations nfs_dir_aops = {
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index 7317f26892c5782a39660cae87ec1afea24e36c0..7f43e890d3564a000dab9365048a3e17dc96395c 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -431,8 +431,6 @@ void nfs42_ssc_unregister_ops(void)
static int nfs4_setlease(struct file *file, int arg, struct file_lease **lease,
void **priv)
{
- if (!S_ISREG(file_inode(file)->i_mode))
- return -EINVAL;
return nfs4_proc_setlease(file, arg, lease, priv);
}
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 1/6] nfs: properly disallow delegation requests on directories
2026-01-07 14:20 ` [PATCH 1/6] nfs: properly disallow delegation requests on directories Jeff Layton
@ 2026-01-08 9:24 ` Christoph Hellwig
0 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2026-01-08 9:24 UTC (permalink / raw)
To: Jeff Layton
Cc: Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown, Christoph Hellwig, linux-cifs, samba-technical,
linux-kernel, linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel
On Wed, Jan 07, 2026 at 09:20:09AM -0500, Jeff Layton wrote:
> Checking for S_ISREG() in nfs4_setlease() is incorrect, since that op is
> never called for directories. The right way to deny lease requests on
> directories is to set the ->setlease() operation to simple_nosetlease()
> in the directory file_operations.
This fixes generic/786 on NFSv4.2 for me, so:
Tested-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/6] smb/client: properly disallow delegations on directories
2026-01-07 14:20 [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Jeff Layton
2026-01-07 14:20 ` [PATCH 1/6] nfs: properly disallow delegation requests on directories Jeff Layton
@ 2026-01-07 14:20 ` Jeff Layton
2026-01-07 14:20 ` [PATCH 3/6] 9p: don't allow delegations to be set " Jeff Layton
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Jeff Layton @ 2026-01-07 14:20 UTC (permalink / raw)
To: Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown
Cc: Christoph Hellwig, linux-cifs, samba-technical, linux-kernel,
linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel, Jeff Layton
The check for S_ISREG() in cifs_setlease() is incorrect since that
operation doesn't get called for directories. The correct way to prevent
delegations on directories is to set the ->setlease() method in directory
file_operations to simple_nosetlease().
Fixes: e6d28ebc17eb ("filelock: push the S_ISREG check down to ->setlease handlers")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/smb/client/cifsfs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c
index d9664634144d3ebba5cdd659f651d6e6e8f975fa..a3dc7cb1ab541d35c2e43eefb7a2d2d23ad88bb3 100644
--- a/fs/smb/client/cifsfs.c
+++ b/fs/smb/client/cifsfs.c
@@ -1149,9 +1149,6 @@ cifs_setlease(struct file *file, int arg, struct file_lease **lease, void **priv
struct inode *inode = file_inode(file);
struct cifsFileInfo *cfile = file->private_data;
- if (!S_ISREG(inode->i_mode))
- return -EINVAL;
-
/* Check if file is oplocked if this is request for new lease */
if (arg == F_UNLCK ||
((arg == F_RDLCK) && CIFS_CACHE_READ(CIFS_I(inode))) ||
@@ -1712,6 +1709,7 @@ const struct file_operations cifs_dir_ops = {
.remap_file_range = cifs_remap_file_range,
.llseek = generic_file_llseek,
.fsync = cifs_dir_fsync,
+ .setlease = simple_nosetlease,
};
static void
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 3/6] 9p: don't allow delegations to be set on directories
2026-01-07 14:20 [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Jeff Layton
2026-01-07 14:20 ` [PATCH 1/6] nfs: properly disallow delegation requests on directories Jeff Layton
2026-01-07 14:20 ` [PATCH 2/6] smb/client: properly disallow delegations " Jeff Layton
@ 2026-01-07 14:20 ` Jeff Layton
2026-01-07 14:20 ` [PATCH 4/6] gfs2: " Jeff Layton
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Jeff Layton @ 2026-01-07 14:20 UTC (permalink / raw)
To: Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown
Cc: Christoph Hellwig, linux-cifs, samba-technical, linux-kernel,
linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel, Jeff Layton
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@kernel.org>
---
fs/9p/vfs_dir.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index e0d34e4e9076e3b1a6c5ed07a3e009a50c9fa2a9..af7f72abbb76aaff934b80d4002f32e3b0d17b6d 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -242,6 +242,7 @@ const struct file_operations v9fs_dir_operations = {
.iterate_shared = v9fs_dir_readdir,
.open = v9fs_file_open,
.release = v9fs_dir_release,
+ .setlease = simple_nosetlease,
};
const struct file_operations v9fs_dir_operations_dotl = {
@@ -251,4 +252,5 @@ const struct file_operations v9fs_dir_operations_dotl = {
.open = v9fs_file_open,
.release = v9fs_dir_release,
.fsync = v9fs_file_fsync_dotl,
+ .setlease = simple_nosetlease,
};
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 4/6] gfs2: don't allow delegations to be set on directories
2026-01-07 14:20 [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Jeff Layton
` (2 preceding siblings ...)
2026-01-07 14:20 ` [PATCH 3/6] 9p: don't allow delegations to be set " Jeff Layton
@ 2026-01-07 14:20 ` Jeff Layton
2026-01-07 14:20 ` [PATCH 5/6] ceph: " Jeff Layton
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Jeff Layton @ 2026-01-07 14:20 UTC (permalink / raw)
To: Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown
Cc: Christoph Hellwig, linux-cifs, samba-technical, linux-kernel,
linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel, Jeff Layton
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: e6d28ebc17eb ("filelock: push the S_ISREG check down to ->setlease handlers")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/gfs2/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index b2d23c98c996553ee14f1969638e709a3d7ede1c..86376f0dbf3a553375b0064c9a1eff3bfa9651f5 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -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,
};
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 5/6] ceph: don't allow delegations to be set on directories
2026-01-07 14:20 [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Jeff Layton
` (3 preceding siblings ...)
2026-01-07 14:20 ` [PATCH 4/6] gfs2: " Jeff Layton
@ 2026-01-07 14:20 ` Jeff Layton
2026-01-07 20:02 ` [EXTERNAL] " Viacheslav Dubeyko
2026-01-07 14:20 ` [PATCH 6/6] vboxsf: " Jeff Layton
` (2 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Jeff Layton @ 2026-01-07 14:20 UTC (permalink / raw)
To: Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown
Cc: Christoph Hellwig, linux-cifs, samba-technical, linux-kernel,
linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel, Jeff Layton
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@kernel.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 = {
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [EXTERNAL] [PATCH 5/6] ceph: don't allow delegations to be set on directories
2026-01-07 14:20 ` [PATCH 5/6] ceph: " Jeff Layton
@ 2026-01-07 20:02 ` Viacheslav Dubeyko
0 siblings, 0 replies; 12+ messages in thread
From: Viacheslav Dubeyko @ 2026-01-07 20:02 UTC (permalink / raw)
To: Jeff Layton, Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown
Cc: Christoph Hellwig, linux-cifs, samba-technical, linux-kernel,
linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel
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@kernel.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@ibm.com>
Thanks,
Slava.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 6/6] vboxsf: don't allow delegations to be set on directories
2026-01-07 14:20 [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Jeff Layton
` (4 preceding siblings ...)
2026-01-07 14:20 ` [PATCH 5/6] ceph: " Jeff Layton
@ 2026-01-07 14:20 ` Jeff Layton
2026-01-07 15:32 ` [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Christoph Hellwig
2026-01-12 9:55 ` Christian Brauner
7 siblings, 0 replies; 12+ messages in thread
From: Jeff Layton @ 2026-01-07 14:20 UTC (permalink / raw)
To: Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown
Cc: Christoph Hellwig, linux-cifs, samba-technical, linux-kernel,
linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel, Jeff Layton
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@kernel.org>
---
fs/vboxsf/dir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/vboxsf/dir.c b/fs/vboxsf/dir.c
index 42bedc4ec7af7709c564a7174805d185ce86f854..230d7589d15cc98f6bc7e930ba40ca5f7dbf7e18 100644
--- a/fs/vboxsf/dir.c
+++ b/fs/vboxsf/dir.c
@@ -186,6 +186,7 @@ const struct file_operations vboxsf_dir_fops = {
.release = vboxsf_dir_release,
.read = generic_read_dir,
.llseek = generic_file_llseek,
+ .setlease = simple_nosetlease,
};
/*
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling
2026-01-07 14:20 [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Jeff Layton
` (5 preceding siblings ...)
2026-01-07 14:20 ` [PATCH 6/6] vboxsf: " Jeff Layton
@ 2026-01-07 15:32 ` Christoph Hellwig
2026-01-07 15:44 ` Jeff Layton
2026-01-12 9:55 ` Christian Brauner
7 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2026-01-07 15:32 UTC (permalink / raw)
To: Jeff Layton
Cc: Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown, Christoph Hellwig, linux-cifs, samba-technical,
linux-kernel, linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel
On Wed, Jan 07, 2026 at 09:20:08AM -0500, Jeff Layton wrote:
> Long term, I think it would be best to change leases/delegations to be
> an opt-in thing, such that leases are always denied by default if the
> method isn't set.
Agreed.
> That's a larger patchset though as we'd need to audit
> all of the file_operations that currently have ->setlease() as NULL.
Initially you can just wire them up everywhere. But I guess that would
be overkill.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling
2026-01-07 15:32 ` [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Christoph Hellwig
@ 2026-01-07 15:44 ` Jeff Layton
0 siblings, 0 replies; 12+ messages in thread
From: Jeff Layton @ 2026-01-07 15:44 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Christian Brauner, Al Viro, Jan Kara, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Bharath SM, Trond Myklebust, Anna Schumaker, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
Andreas Gruenbacher, Xiubo Li, Ilya Dryomov, Hans de Goede,
NeilBrown, linux-cifs, samba-technical, linux-kernel, linux-nfs,
v9fs, gfs2, ceph-devel, linux-fsdevel
On Wed, 2026-01-07 at 07:32 -0800, Christoph Hellwig wrote:
> On Wed, Jan 07, 2026 at 09:20:08AM -0500, Jeff Layton wrote:
> > Long term, I think it would be best to change leases/delegations to be
> > an opt-in thing, such that leases are always denied by default if the
> > method isn't set.
>
> Agreed.
>
> > That's a larger patchset though as we'd need to audit
> > all of the file_operations that currently have ->setlease() as NULL.
>
> Initially you can just wire them up everywhere. But I guess that would
> be overkill.
That is probably the simplest approach, but there are literally
thousands of file_operations structures. Most are in driver code and
have no business dealing with leases. Technically, I guess you can set
a lease on those fd's today, but likely no one ever does it. We
probably also don't really need lease support in (e.g.) sysfs, debugfs,
etc. I'm not sure if there is anything that prevents them there.
I think what we probably want to do is wire them up in most filesystems
under fs/. Basically, in anything that might reasonably be exportable
via NFS or SMB, and have the rest deny them.
We might get a few regressions with that approach but if so we would
have an opportunity to dig into why people are setting leases on these
more "exotic" filesystems too.
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling
2026-01-07 14:20 [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Jeff Layton
` (6 preceding siblings ...)
2026-01-07 15:32 ` [PATCH 0/6] vfs: properly deny directory leases on filesystems with special lease handling Christoph Hellwig
@ 2026-01-12 9:55 ` Christian Brauner
7 siblings, 0 replies; 12+ messages in thread
From: Christian Brauner @ 2026-01-12 9:55 UTC (permalink / raw)
To: Jeff Layton
Cc: Christian Brauner, Christoph Hellwig, linux-cifs, samba-technical,
linux-kernel, linux-nfs, v9fs, gfs2, ceph-devel, linux-fsdevel,
Al Viro, Jan Kara, Steve French, Paulo Alcantara, Ronnie Sahlberg,
Shyam Prasad N, Tom Talpey, Bharath SM, Trond Myklebust,
Anna Schumaker, Eric Van Hensbergen, Latchesar Ionkov,
Dominique Martinet, Christian Schoenebeck, Andreas Gruenbacher,
Xiubo Li, Ilya Dryomov, Hans de Goede, NeilBrown
On Wed, 07 Jan 2026 09:20:08 -0500, Jeff Layton wrote:
> Filesystems currently have to set the ->setlease() method explicitly in
> order to deny attempts to set a lease or delegation. With the advent of
> directory delegations, we now need to set ->setlease on the directory
> file_operations for several filesystems to simple_nosetlease() to ensure
> this.
>
> This patchset does that. There should be no noticeable change in
> behavior, other than fixing the support detection in xfstests, allowing
> lease/delegation tests to be properly skipped on these filesystems.
>
> [...]
Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes
[1/6] nfs: properly disallow delegation requests on directories
https://git.kernel.org/vfs/vfs/c/10dcd5110678
[2/6] smb/client: properly disallow delegations on directories
https://git.kernel.org/vfs/vfs/c/b9a9be4d3557
[3/6] 9p: don't allow delegations to be set on directories
https://git.kernel.org/vfs/vfs/c/5d65a70bd043
[4/6] gfs2: don't allow delegations to be set on directories
https://git.kernel.org/vfs/vfs/c/ce946c4fb98c
[5/6] ceph: don't allow delegations to be set on directories
https://git.kernel.org/vfs/vfs/c/ffb321045b0f
[6/6] vboxsf: don't allow delegations to be set on directories
https://git.kernel.org/vfs/vfs/c/8a5511eeaa5c
^ permalink raw reply [flat|nested] 12+ messages in thread