mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:09:29 +02:00
jfs: add setlease file operation
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 <jlayton@kernel.org> Link: https://patch.msgid.link/20260108-setlease-6-20-v1-12-ea4dec9b67fa@kernel.org Acked-by: Richard Weinberger <richard@nod.at> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Kleikamp <dave.kleikamp@oracle.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user