Skip to content

Commit 92bbd67

Browse files
z00467499smfrench
authored andcommitted
cifs: Fix wrong return value checking when GETFLAGS
The return value of CIFSGetExtAttr is negative, should be checked with -EOPNOTSUPP rather than EOPNOTSUPP. Fixes: 64a5cfa ("Allow setting per-file compression via SMB2/3") Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent d520de6 commit 92bbd67

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/cifs/ioctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
343343
rc = put_user(ExtAttrBits &
344344
FS_FL_USER_VISIBLE,
345345
(int __user *)arg);
346-
if (rc != EOPNOTSUPP)
346+
if (rc != -EOPNOTSUPP)
347347
break;
348348
}
349349
#endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
@@ -373,7 +373,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
373373
* pSMBFile->fid.netfid,
374374
* extAttrBits,
375375
* &ExtAttrMask);
376-
* if (rc != EOPNOTSUPP)
376+
* if (rc != -EOPNOTSUPP)
377377
* break;
378378
*/
379379

0 commit comments

Comments
 (0)