diff options
author | Pavel Shilovsky <pshilov@microsoft.com> | 2019-11-21 20:35:12 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-11-25 08:14:53 +0100 |
commit | 9150c3adbf24d77cfba37f03639d4a908ca4ac25 (patch) | |
tree | b9fa0904f0d98d78aab1818c966a273bc67c462c /fs/cifs/smb2proto.h | |
parent | CIFS: Respect O_SYNC and O_DIRECT flags during reconnect (diff) | |
download | linux-9150c3adbf24d77cfba37f03639d4a908ca4ac25.tar.xz linux-9150c3adbf24d77cfba37f03639d4a908ca4ac25.zip |
CIFS: Close open handle after interrupted close
If Close command is interrupted before sending a request
to the server the client ends up leaking an open file
handle. This wastes server resources and can potentially
block applications that try to remove the file or any
directory containing this file.
Fix this by putting the close command into a worker queue,
so another thread retries it later.
Cc: Stable <stable@vger.kernel.org>
Tested-by: Frank Sorenson <sorenson@redhat.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2proto.h')
-rw-r--r-- | fs/cifs/smb2proto.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/smb2proto.h b/fs/cifs/smb2proto.h index 71b2930b8e0b..2a12a2fa38a2 100644 --- a/fs/cifs/smb2proto.h +++ b/fs/cifs/smb2proto.h @@ -212,6 +212,9 @@ extern int SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon, extern int SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon, const u64 persistent_fid, const u64 volatile_fid, const __u8 oplock_level); +extern int smb2_handle_cancelled_close(struct cifs_tcon *tcon, + __u64 persistent_fid, + __u64 volatile_fid); extern int smb2_handle_cancelled_mid(char *buffer, struct TCP_Server_Info *server); void smb2_cancelled_close_fid(struct work_struct *work); |