Skip to content

Commit

Permalink
cifs: fix interrupted close commands
Browse files Browse the repository at this point in the history
commit 2659d3b 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: 6988a61 ("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>
  • Loading branch information
pcacjr authored and gregkh committed Jan 19, 2021
1 parent 0e4c42c commit 531c88c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/smb2pdu.c
Expand Up @@ -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,
Expand Down

0 comments on commit 531c88c

Please sign in to comment.