Skip to content

Commit

Permalink
smb: remove redundant check
Browse files Browse the repository at this point in the history
->setlease() is never called on non-regular files now. So remove the
check from cifs_setlease().

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
  • Loading branch information
neilbrown authored and brauner committed Feb 6, 2024
1 parent 7b80010 commit 292fcaa
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/smb/client/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))) ||
Expand Down

0 comments on commit 292fcaa

Please sign in to comment.