Skip to contentSkip to conversation

FAILED: patch "[PATCH] cifs: fix interrupted close commands" failed to apply to 5.4-stable tree

PATCH [email protected] 1 participant 1 message Jan 17, 2021 Stable branch

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 2659d3bff3e1b000f49907d0839178b101a89887 Mon Sep 17 00:00:00 2001
From: Paulo Alcantara <[email protected]>
Date: Wed, 13 Jan 2021 14:16:16 -0300
Subject: [PATCH] cifs: fix interrupted close commands

Retry close command if it gets interrupted to not leak open handles on the server.

Fixes 6988a619f5b7 ("cifs: allow syscalls to be restarted in __smb_send_rqst()")
fs/cifs/smb2pdu.c +1 -1
index 067eb44c7baa..794fc3b68b4f 100644
@@ -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,