summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2026-01-08 12:13:19 -0500
committerChristian Brauner <brauner@kernel.org>2026-01-12 10:55:48 +0100
commit51e49111c00bee76ca403adf7cd617b71a9a0da4 (patch)
tree9604640012fd39594bbf5978291f0cb00e472c47
parent2b10994be716b07d881ad0f966d6a4bb13b20750 (diff)
fs: remove simple_nosetlease()
Setting ->setlease() to a NULL pointer now has the same effect as setting it to simple_nosetlease(). Remove all of the setlease file_operations that are set to simple_nosetlease, and the function itself. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260108-setlease-6-20-v1-24-ea4dec9b67fa@kernel.org Acked-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--fs/9p/vfs_dir.c2
-rw-r--r--fs/9p/vfs_file.c2
-rw-r--r--fs/ceph/dir.c2
-rw-r--r--fs/ceph/file.c1
-rw-r--r--fs/fuse/dir.c1
-rw-r--r--fs/gfs2/file.c2
-rw-r--r--fs/libfs.c18
-rw-r--r--fs/nfs/dir.c1
-rw-r--r--fs/nfs/file.c1
-rw-r--r--fs/smb/client/cifsfs.c1
-rw-r--r--fs/vboxsf/dir.c1
-rw-r--r--fs/vboxsf/file.c1
-rw-r--r--include/linux/fs.h1
13 files changed, 0 insertions, 34 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index af7f72abbb76..e0d34e4e9076 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -242,7 +242,6 @@ 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 = {
@@ -252,5 +251,4 @@ const struct file_operations v9fs_dir_operations_dotl = {
.open = v9fs_file_open,
.release = v9fs_dir_release,
.fsync = v9fs_file_fsync_dotl,
- .setlease = simple_nosetlease,
};
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 6f3880208587..c5e73c37baea 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -517,7 +517,6 @@ const struct file_operations v9fs_file_operations = {
.splice_read = v9fs_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync,
- .setlease = simple_nosetlease,
};
const struct file_operations v9fs_file_operations_dotl = {
@@ -532,5 +531,4 @@ const struct file_operations v9fs_file_operations_dotl = {
.splice_read = v9fs_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync_dotl,
- .setlease = simple_nosetlease,
};
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 804588524cd5..86d7aa594ea9 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -2214,7 +2214,6 @@ 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 = {
@@ -2222,7 +2221,6 @@ 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 = {
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 983390069f73..31b691b2aea2 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -3169,7 +3169,6 @@ const struct file_operations ceph_file_fops = {
.mmap_prepare = ceph_mmap_prepare,
.fsync = ceph_fsync,
.lock = ceph_lock,
- .setlease = simple_nosetlease,
.flock = ceph_flock,
.splice_read = ceph_splice_read,
.splice_write = iter_file_splice_write,
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 64b29db52cf4..7c183ec496bf 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -2430,7 +2430,6 @@ static const struct file_operations fuse_dir_operations = {
.fsync = fuse_dir_fsync,
.unlocked_ioctl = fuse_dir_ioctl,
.compat_ioctl = fuse_dir_compat_ioctl,
- .setlease = simple_nosetlease,
};
static const struct inode_operations fuse_common_inode_operations = {
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 6daa96d815e1..3e061e8115ec 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -1593,7 +1593,6 @@ const struct file_operations gfs2_file_fops = {
.flock = gfs2_flock,
.splice_read = copy_splice_read,
.splice_write = gfs2_file_splice_write,
- .setlease = simple_nosetlease,
.fallocate = gfs2_fallocate,
.fop_flags = FOP_ASYNC_LOCK,
};
@@ -1608,7 +1607,6 @@ const struct file_operations gfs2_dir_fops = {
.lock = gfs2_lock,
.flock = gfs2_flock,
.llseek = default_llseek,
- .setlease = simple_nosetlease,
.fop_flags = FOP_ASYNC_LOCK,
};
diff --git a/fs/libfs.c b/fs/libfs.c
index 697c6d5fc127..f1860dff86f2 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -1700,24 +1700,6 @@ struct inode *alloc_anon_inode(struct super_block *s)
EXPORT_SYMBOL(alloc_anon_inode);
/**
- * simple_nosetlease - generic helper for prohibiting leases
- * @filp: file pointer
- * @arg: type of lease to obtain
- * @flp: new lease supplied for insertion
- * @priv: private data for lm_setup operation
- *
- * Generic helper for filesystems that do not wish to allow leases to be set.
- * All arguments are ignored and it just returns -EINVAL.
- */
-int
-simple_nosetlease(struct file *filp, int arg, struct file_lease **flp,
- void **priv)
-{
- return -EINVAL;
-}
-EXPORT_SYMBOL(simple_nosetlease);
-
-/**
* simple_get_link - generic helper to get the target of "fast" symlinks
* @dentry: not used here
* @inode: the symlink inode
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 71df279febf7..23a78a742b61 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -66,7 +66,6 @@ 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/file.c b/fs/nfs/file.c
index d020aab40c64..9d2695619618 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -962,7 +962,6 @@ const struct file_operations nfs_file_operations = {
.splice_read = nfs_file_splice_read,
.splice_write = iter_file_splice_write,
.check_flags = nfs_check_flags,
- .setlease = simple_nosetlease,
.fop_flags = FOP_DONTCACHE,
};
EXPORT_SYMBOL_GPL(nfs_file_operations);
diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c
index a3dc7cb1ab54..8015df1f711e 100644
--- a/fs/smb/client/cifsfs.c
+++ b/fs/smb/client/cifsfs.c
@@ -1709,7 +1709,6 @@ 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
diff --git a/fs/vboxsf/dir.c b/fs/vboxsf/dir.c
index 230d7589d15c..42bedc4ec7af 100644
--- a/fs/vboxsf/dir.c
+++ b/fs/vboxsf/dir.c
@@ -186,7 +186,6 @@ const struct file_operations vboxsf_dir_fops = {
.release = vboxsf_dir_release,
.read = generic_read_dir,
.llseek = generic_file_llseek,
- .setlease = simple_nosetlease,
};
/*
diff --git a/fs/vboxsf/file.c b/fs/vboxsf/file.c
index 4bebd947314a..111752010edb 100644
--- a/fs/vboxsf/file.c
+++ b/fs/vboxsf/file.c
@@ -218,7 +218,6 @@ const struct file_operations vboxsf_reg_fops = {
.release = vboxsf_file_release,
.fsync = noop_fsync,
.splice_read = filemap_splice_read,
- .setlease = simple_nosetlease,
};
const struct inode_operations vboxsf_reg_iops = {
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f5c9cf28c4dc..e46e8aad9339 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3217,7 +3217,6 @@ extern int always_delete_dentry(const struct dentry *);
extern struct inode *alloc_anon_inode(struct super_block *);
struct inode *anon_inode_make_secure_inode(struct super_block *sb, const char *name,
const struct inode *context_inode);
-extern int simple_nosetlease(struct file *, int, struct file_lease **, void **);
extern struct dentry *simple_lookup(struct inode *, struct dentry *, unsigned int flags);
extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);