cifs: Fix wrong return value checking when GETFLAGS
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Tue, 15 Nov 2022 10:39:34 +0000 (18:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Nov 2022 08:24:41 +0000 (09:24 +0100)
commit4a55aec1425fc8e9bd5ea7c2f837e8ea2f380ae1
tree2f9f6c6819bb6a53ef3c5c015188a523991a15de
parentc8baf1fc248b2e88642f094fea9509a9bf98c5bb
cifs: Fix wrong return value checking when GETFLAGS

[ Upstream commit 92bbd67a55fee50743b42825d1c016e7fd5c79f9 ]

The return value of CIFSGetExtAttr is negative, should be checked
with -EOPNOTSUPP rather than EOPNOTSUPP.

Fixes: 64a5cfa6db94 ("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>
fs/cifs/ioctl.c