From: NeilBrown Date: Tue, 6 Feb 2024 13:08:57 +0000 (+0100) Subject: smb: remove redundant check X-Git-Tag: v6.9-rc1~218^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=292fcaa1f937345cb65f3af82a1ee6692c8df9eb;p=thirdparty%2Flinux.git smb: remove redundant check ->setlease() is never called on non-regular files now. So remove the check from cifs_setlease(). Link: https://lore.kernel.org/r/170716318935.13976.13465352731929804157@noble.neil.brown.name Signed-off-by: NeilBrown Signed-off-by: Christian Brauner --- diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c index 5eee5b00547fe..cbcb98d5f2d70 100644 --- a/fs/smb/client/cifsfs.c +++ b/fs/smb/client/cifsfs.c @@ -1094,9 +1094,6 @@ cifs_setlease(struct file *file, int arg, struct file_lease **lease, void **priv struct inode *inode = file_inode(file); struct cifsFileInfo *cfile = file->private_data; - if (!(S_ISREG(inode->i_mode))) - return -EINVAL; - /* Check if file is oplocked if this is request for new lease */ if (arg == F_UNLCK || ((arg == F_RDLCK) && CIFS_CACHE_READ(CIFS_I(inode))) ||