summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@cjr.nz>2021-01-13 14:16:16 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-19 18:27:19 +0100
commit531c88c9fe5649cdc0f533dcda4c9d5a98a7023a (patch)
tree2036ae22c7f5a664fa6499245b1fe538abd7e78d /fs/cifs
parent0e4c42cb4a5f517bfc0cd970a770cc72e75dbc6e (diff)
downloadlinux-stable-531c88c9fe5649cdc0f533dcda4c9d5a98a7023a.tar.gz
linux-stable-531c88c9fe5649cdc0f533dcda4c9d5a98a7023a.tar.bz2
linux-stable-531c88c9fe5649cdc0f533dcda4c9d5a98a7023a.zip
cifs: fix interrupted close commands
commit 2659d3bff3e1b000f49907d0839178b101a89887 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs')
-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 fc06c762fbbf..c6f8bc6729aa 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,