[focal:linux-azure][PATCH 2/2] cifs: fix interrupted close commands
Marcelo Henrique Cerri
marcelo.cerri at canonical.com
Mon Jan 25 17:52:34 UTC 2021
From: Paulo Alcantara <pc at cjr.nz>
BugLink: https://bugs.launchpad.net/bugs/1911438
Retry close command if it gets interrupted to not leak open handles on
the server.
Signed-off-by: Paulo Alcantara (SUSE) <pc at cjr.nz>
Reported-by: Duncan Findlay <duncf at duncf.ca>
Suggested-by: Pavel Shilovsky <pshilov at microsoft.com>
Fixes: 6988a619f5b7 ("cifs: allow syscalls to be restarted in __smb_send_rqst()")
Cc: stable at vger.kernel.org
Reviewd-by: Pavel Shilovsky <pshilov at microsoft.com>
Signed-off-by: Steve French <stfrench at microsoft.com>
(cherry picked from commit 2659d3bff3e1b000f49907d0839178b101a89887)
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri at canonical.com>
---
fs/cifs/smb2pdu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 6695994d2a84..dd9c48c1f6ce 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3011,7 +3011,7 @@ __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
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,
--
2.25.1
More information about the kernel-team
mailing list