summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.c
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@cjr.nz>2021-01-13 18:16:16 +0100
committerSteve French <stfrench@microsoft.com>2021-01-13 19:55:33 +0100
commit2659d3bff3e1b000f49907d0839178b101a89887 (patch)
tree6afdc4626d0327875d7f4f44650e128392d9571b /fs/cifs/smb2pdu.c
parentcifs: check pointer before freeing (diff)
downloadlinux-2659d3bff3e1b000f49907d0839178b101a89887.tar.xz
linux-2659d3bff3e1b000f49907d0839178b101a89887.zip
cifs: fix interrupted close commands
Retry close command if it gets interrupted to not leak open handles on the server. Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Reported-by: Duncan Findlay <duncf@duncf.ca> Suggested-by: Pavel Shilovsky <pshilov@microsoft.com> Fixes: 6988a619f5b7 ("cifs: allow syscalls to be restarted in __smb_send_rqst()") Cc: stable@vger.kernel.org Reviewd-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r--fs/cifs/smb2pdu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 067eb44c7baa..794fc3b68b4f 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3248,7 +3248,7 @@ close_exit:
free_rsp_buf(resp_buftype, rsp);
/* retry close in a worker thread if this one is interrupted */
- if (rc == -EINTR) {
+ if (is_interrupt_error(rc)) {
int tmp_rc;
tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid,