Merge tag '6.9-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6
[sfrench/cifs-2.6.git] / fs / smb / client / cifsfs.c
index 1bfd1b4c41d9c66567b101ef4c0d7f1d689cdbf7..81d9aafd2210afb64e7fbcb58a1da901048dc34d 100644 (file)
@@ -1087,7 +1087,7 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int whence)
 }
 
 static int
-cifs_setlease(struct file *file, int arg, struct file_lock **lease, void **priv)
+cifs_setlease(struct file *file, int arg, struct file_lease **lease, void **priv)
 {
        /*
         * Note that this is called by vfs setlease with i_lock held to
@@ -1096,9 +1096,6 @@ cifs_setlease(struct file *file, int arg, struct file_lock **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))) ||