Re: [PATCH 12/24] jfs: add setlease file operation
Dave Kleikamp <[email protected]>
| Newsgroups | dev.linux.lists.gfs2,dev.linux.lists.ntfs3,dev.linux.lists.ocfs2-devel,dev.linux.lists.v9fs,net.sourceforge.lists.linux-f2fs-devel,org.infradead.lists.linux-mtd,org.kernel.vger.ceph-devel,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-cifs,org.kernel.vger.linux-doc,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs,org.kernel.vger.linux-nilfs,org.kernel.vger.linux-unionfs,org.kernel.vger.linux-xfs,org.kvack.linux-mm,org.ozlabs.lists.linux-erofs |
|---|---|
| Message-ID | <[email protected]> |
Reviewed-by: Dave Kleikamp <[email protected]> On 1/8/26 11:13AM, Jeff Layton wrote: > Add the setlease file_operation to jfs_file_operations and > jfs_dir_operations, pointing to generic_setlease. A future patch will > change the default behavior to reject lease attempts with -EINVAL when > there is no setlease file operation defined. Add generic_setlease to > retain the ability to set leases on this filesystem. > > Signed-off-by: Jeff Layton <[email protected]> > --- > fs/jfs/file.c | 2 ++ > fs/jfs/namei.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/fs/jfs/file.c b/fs/jfs/file.c > index 87ad042221e78959200cce12a59a3ffd6d06c0d7..246568cb9a6ec144831eb3592712cce323d8cf1d 100644 > --- a/fs/jfs/file.c > +++ b/fs/jfs/file.c > @@ -6,6 +6,7 @@ > > #include <linux/mm.h> > #include <linux/fs.h> > +#include <linux/filelock.h> > #include <linux/posix_acl.h> > #include <linux/quotaops.h> > #include "jfs_incore.h" > @@ -153,4 +154,5 @@ const struct file_operations jfs_file_operations = { > .release = jfs_release, > .unlocked_ioctl = jfs_ioctl, > .compat_ioctl = compat_ptr_ioctl, > + .setlease = generic_setlease, > }; > diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c > index 65a218eba8faf9508f5727515b812f6de2661618..f7e2ae7a4c37ed87675f0ccb3276b37e6ce08cb4 100644 > --- a/fs/jfs/namei.c > +++ b/fs/jfs/namei.c > @@ -5,6 +5,7 @@ > */ > > #include <linux/fs.h> > +#include <linux/filelock.h> > #include <linux/namei.h> > #include <linux/ctype.h> > #include <linux/quotaops.h> > @@ -1545,6 +1546,7 @@ const struct file_operations jfs_dir_operations = { > .unlocked_ioctl = jfs_ioctl, > .compat_ioctl = compat_ptr_ioctl, > .llseek = generic_file_llseek, > + .setlease = generic_setlease, > }; > > static int jfs_ci_hash(const struct dentry *dir, struct qstr *this) >