mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
cifs: Fix wrong return value checking when GETFLAGS
[ Upstream commit92bbd67a55] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
@@ -206,7 +206,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
|
||||
rc = put_user(ExtAttrBits &
|
||||
FS_FL_USER_VISIBLE,
|
||||
(int __user *)arg);
|
||||
if (rc != EOPNOTSUPP)
|
||||
if (rc != -EOPNOTSUPP)
|
||||
break;
|
||||
}
|
||||
#endif /* CONFIG_CIFS_POSIX */
|
||||
@@ -235,7 +235,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
|
||||
* pSMBFile->fid.netfid,
|
||||
* extAttrBits,
|
||||
* &ExtAttrMask);
|
||||
* if (rc != EOPNOTSUPP)
|
||||
* if (rc != -EOPNOTSUPP)
|
||||
* break;
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user