OSDN Git Service

CIFS: Close open handle after interrupted close
authorPavel Shilovsky <pshilov@microsoft.com>
Thu, 21 Nov 2019 19:35:12 +0000 (11:35 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:57:35 +0000 (10:57 +0100)
commite8b26877c4290c84b493075ed515c2e3265c1e47
tree68ba4af3ad21a5f6db54ed21675d53a05ac56399
parent3ddc09c8233efdde0917537d4002905781bc5aae
CIFS: Close open handle after interrupted close

commit 9150c3adbf24d77cfba37f03639d4a908ca4ac25 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2misc.c
fs/cifs/smb2pdu.c
fs/cifs/smb2proto.h