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>
This commit is contained in:
Jeff Layton
2026-01-08 12:13:19 -05:00
committed by Christian Brauner
parent 2b10994be7
commit 51e49111c0
13 changed files with 0 additions and 34 deletions

View File

@@ -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,
};

View File

@@ -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,
};

View File

@@ -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 = {

View File

@@ -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,

View File

@@ -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 = {

View File

@@ -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,
};

View File

@@ -1699,24 +1699,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

View File

@@ -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 = {

View File

@@ -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);

View File

@@ -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

View File

@@ -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,
};
/*

View File

@@ -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 = {

View File

@@ -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 *);