mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
cifs: Fix wrong return value checking when GETFLAGS
The return value of CIFSGetExtAttr is negative, should be checked
with -EOPNOTSUPP rather than EOPNOTSUPP.
Fixes: 64a5cfa6db
("Allow setting per-file compression via SMB2/3")
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
d520de6cb4
commit
92bbd67a55
1 changed files with 2 additions and 2 deletions
|
@ -343,7 +343,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
|
||||||
rc = put_user(ExtAttrBits &
|
rc = put_user(ExtAttrBits &
|
||||||
FS_FL_USER_VISIBLE,
|
FS_FL_USER_VISIBLE,
|
||||||
(int __user *)arg);
|
(int __user *)arg);
|
||||||
if (rc != EOPNOTSUPP)
|
if (rc != -EOPNOTSUPP)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
|
#endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
|
||||||
|
@ -373,7 +373,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
|
||||||
* pSMBFile->fid.netfid,
|
* pSMBFile->fid.netfid,
|
||||||
* extAttrBits,
|
* extAttrBits,
|
||||||
* &ExtAttrMask);
|
* &ExtAttrMask);
|
||||||
* if (rc != EOPNOTSUPP)
|
* if (rc != -EOPNOTSUPP)
|
||||||
* break;
|
* break;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue