Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c553300f authored by Paulo Alcantara's avatar Paulo Alcantara Committed by Greg Kroah-Hartman
Browse files

cifs: fix interrupted close commands



[ Upstream commit 2659d3bff3e1b000f49907d0839178b101a89887 ]

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

Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Reported-by: default avatarDuncan Findlay <duncf@duncf.ca>
Suggested-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
Fixes: 6988a619f5b7 ("cifs: allow syscalls to be restarted in __smb_send_rqst()")
Cc: stable@vger.kernel.org
Reviewd-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d17a9571
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2996,7 +2996,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,