Thread (4 messages) 4 messages, 4 authors, 2021-01-14

Re: [PATCH] cifs: fix interrupted close commands

From: Pavel Shilovsky <hidden>
Date: 2021-01-13 18:30:05
Also in: linux-cifs

ср, 13 янв. 2021 г. в 09:16, Paulo Alcantara [off-list ref]:
quoted hunk ↗ jump to hunk
Retry close command if it gets interrupted to not leak open handles on
the server.

Signed-off-by: Paulo Alcantara (SUSE) <redacted>
Reported-by: Duncan Findlay <redacted>
Suggested-by: Pavel Shilovsky <redacted>
Fixes: 6988a619f5b7 ("cifs: allow syscalls to be restarted in __smb_send_rqst()")
Cc: stable@vger.kernel.org
---
 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 067eb44c7baa..794fc3b68b4f 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3248,7 +3248,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.29.2
Thanks for the fix!

Reviewed-by: Pavel Shilovsky <redacted>

--
Best regards,
Pavel Shilovsky
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help