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>
Fri, 25 Nov 2022 16:45:48 +0000 (17:45 +0100)
commite13ef43813ebf0584488df98e21eaa049f920d3d
tree2186bffba02239c187fd26a2ea4ecc2d415528ed
parent9f00da9c866d506998bf0a3f699ec900730472da
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