From 51e49111c00bee76ca403adf7cd617b71a9a0da4 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Thu, 8 Jan 2026 12:13:19 -0500 Subject: 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 Link: https://patch.msgid.link/20260108-setlease-6-20-v1-24-ea4dec9b67fa@kernel.org Acked-by: Al Viro Acked-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner --- fs/libfs.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'fs/libfs.c') diff --git a/fs/libfs.c b/fs/libfs.c index 697c6d5fc127..f1860dff86f2 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -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 -- cgit v1.2.3