Commit 822053fa authored by Zhang Xiaoxu's avatar Zhang Xiaoxu Committed by Lipeng Sang
Browse files

cifs: Fix xid leak in cifs_copy_file_range()

stable inclusion
from stable-v5.10.152
commit bf49d4fe4ab7b8d812927a2c7b514864d5fc1bb2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I73HJ0

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bf49d4fe4ab7b8d812927a2c7b514864d5fc1bb2



--------------------------------

[ Upstream commit 9a97df40 ]

If the file is used by swap, before return -EOPNOTSUPP, should
free the xid, otherwise, the xid will be leaked.

Fixes: 4e8aea30 ("smb3: enable swap on SMB3 mounts")
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent c729db05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment