Skip to content

Commit 51e4911

Browse files
jtlaytonbrauner
authored andcommitted
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>
1 parent 2b10994 commit 51e4911

File tree

13 files changed

+0
-34
lines changed

13 files changed

+0
-34
lines changed

fs/9p/vfs_dir.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ const struct file_operations v9fs_dir_operations = {
242242
.iterate_shared = v9fs_dir_readdir,
243243
.open = v9fs_file_open,
244244
.release = v9fs_dir_release,
245-
.setlease = simple_nosetlease,
246245
};
247246

248247
const struct file_operations v9fs_dir_operations_dotl = {
@@ -252,5 +251,4 @@ const struct file_operations v9fs_dir_operations_dotl = {
252251
.open = v9fs_file_open,
253252
.release = v9fs_dir_release,
254253
.fsync = v9fs_file_fsync_dotl,
255-
.setlease = simple_nosetlease,
256254
};

fs/9p/vfs_file.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ const struct file_operations v9fs_file_operations = {
517517
.splice_read = v9fs_file_splice_read,
518518
.splice_write = iter_file_splice_write,
519519
.fsync = v9fs_file_fsync,
520-
.setlease = simple_nosetlease,
521520
};
522521

523522
const struct file_operations v9fs_file_operations_dotl = {
@@ -532,5 +531,4 @@ const struct file_operations v9fs_file_operations_dotl = {
532531
.splice_read = v9fs_file_splice_read,
533532
.splice_write = iter_file_splice_write,
534533
.fsync = v9fs_file_fsync_dotl,
535-
.setlease = simple_nosetlease,
536534
};

fs/ceph/dir.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,15 +2214,13 @@ const struct file_operations ceph_dir_fops = {
22142214
.fsync = ceph_fsync,
22152215
.lock = ceph_lock,
22162216
.flock = ceph_flock,
2217-
.setlease = simple_nosetlease,
22182217
};
22192218

22202219
const struct file_operations ceph_snapdir_fops = {
22212220
.iterate_shared = shared_ceph_readdir,
22222221
.llseek = ceph_dir_llseek,
22232222
.open = ceph_open,
22242223
.release = ceph_release,
2225-
.setlease = simple_nosetlease,
22262224
};
22272225

22282226
const struct inode_operations ceph_dir_iops = {

fs/ceph/file.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3169,7 +3169,6 @@ const struct file_operations ceph_file_fops = {
31693169
.mmap_prepare = ceph_mmap_prepare,
31703170
.fsync = ceph_fsync,
31713171
.lock = ceph_lock,
3172-
.setlease = simple_nosetlease,
31733172
.flock = ceph_flock,
31743173
.splice_read = ceph_splice_read,
31753174
.splice_write = iter_file_splice_write,

fs/fuse/dir.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,6 @@ static const struct file_operations fuse_dir_operations = {
24302430
.fsync = fuse_dir_fsync,
24312431
.unlocked_ioctl = fuse_dir_ioctl,
24322432
.compat_ioctl = fuse_dir_compat_ioctl,
2433-
.setlease = simple_nosetlease,
24342433
};
24352434

24362435
static const struct inode_operations fuse_common_inode_operations = {

fs/gfs2/file.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,6 @@ const struct file_operations gfs2_file_fops = {
15931593
.flock = gfs2_flock,
15941594
.splice_read = copy_splice_read,
15951595
.splice_write = gfs2_file_splice_write,
1596-
.setlease = simple_nosetlease,
15971596
.fallocate = gfs2_fallocate,
15981597
.fop_flags = FOP_ASYNC_LOCK,
15991598
};
@@ -1608,7 +1607,6 @@ const struct file_operations gfs2_dir_fops = {
16081607
.lock = gfs2_lock,
16091608
.flock = gfs2_flock,
16101609
.llseek = default_llseek,
1611-
.setlease = simple_nosetlease,
16121610
.fop_flags = FOP_ASYNC_LOCK,
16131611
};
16141612

fs/libfs.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,24 +1699,6 @@ struct inode *alloc_anon_inode(struct super_block *s)
16991699
}
17001700
EXPORT_SYMBOL(alloc_anon_inode);
17011701

1702-
/**
1703-
* simple_nosetlease - generic helper for prohibiting leases
1704-
* @filp: file pointer
1705-
* @arg: type of lease to obtain
1706-
* @flp: new lease supplied for insertion
1707-
* @priv: private data for lm_setup operation
1708-
*
1709-
* Generic helper for filesystems that do not wish to allow leases to be set.
1710-
* All arguments are ignored and it just returns -EINVAL.
1711-
*/
1712-
int
1713-
simple_nosetlease(struct file *filp, int arg, struct file_lease **flp,
1714-
void **priv)
1715-
{
1716-
return -EINVAL;
1717-
}
1718-
EXPORT_SYMBOL(simple_nosetlease);
1719-
17201702
/**
17211703
* simple_get_link - generic helper to get the target of "fast" symlinks
17221704
* @dentry: not used here

fs/nfs/dir.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ const struct file_operations nfs_dir_operations = {
6666
.open = nfs_opendir,
6767
.release = nfs_closedir,
6868
.fsync = nfs_fsync_dir,
69-
.setlease = simple_nosetlease,
7069
};
7170

7271
const struct address_space_operations nfs_dir_aops = {

fs/nfs/file.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,6 @@ const struct file_operations nfs_file_operations = {
962962
.splice_read = nfs_file_splice_read,
963963
.splice_write = iter_file_splice_write,
964964
.check_flags = nfs_check_flags,
965-
.setlease = simple_nosetlease,
966965
.fop_flags = FOP_DONTCACHE,
967966
};
968967
EXPORT_SYMBOL_GPL(nfs_file_operations);

fs/smb/client/cifsfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,6 @@ const struct file_operations cifs_dir_ops = {
17091709
.remap_file_range = cifs_remap_file_range,
17101710
.llseek = generic_file_llseek,
17111711
.fsync = cifs_dir_fsync,
1712-
.setlease = simple_nosetlease,
17131712
};
17141713

17151714
static void

0 commit comments

Comments
 (0)