cifs: Fix xid leak in cifs_copy_file_range()
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Mon, 17 Oct 2022 14:45:22 +0000 (22:45 +0800)
committerSteve French <stfrench@microsoft.com>
Tue, 18 Oct 2022 16:33:43 +0000 (11:33 -0500)
commit9a97df404a402fe1174d2d1119f87ff2a0ca2fe9
tree4a59ea5842d3d10e37f498378d6641508c49dd93
parentfee0fb1f15054bb6a0ede452acb42da5bef4d587
cifs: Fix xid leak in cifs_copy_file_range()

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

Fixes: 4e8aea30f775 ("smb3: enable swap on SMB3 mounts")
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsfs.c