SMB3: retry on STATUS_INSUFFICIENT_RESOURCES instead of failing write
commitf49898960a6c1090d5a14ba67026666a8a5693c1
authorSteve French <stfrench@microsoft.com>
Mon, 17 Jun 2019 19:49:07 +0000 (17 14:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jun 2019 03:36:54 +0000 (25 11:36 +0800)
tree22d9fd8a058a64da5ee392d345af730014275ea1
parent1fd49b11c8f7c0bf1f018144266cd6c1de1e6056
SMB3: retry on STATUS_INSUFFICIENT_RESOURCES instead of failing write

commit 8d526d62db907e786fd88948c75d1833d82bd80e upstream.

Some servers such as Windows 10 will return STATUS_INSUFFICIENT_RESOURCES
as the number of simultaneous SMB3 requests grows (even though the client
has sufficient credits).  Return EAGAIN on STATUS_INSUFFICIENT_RESOURCES
so that we can retry writes which fail with this status code.

This (for example) fixes large file copies to Windows 10 on fast networks.

Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2maperror.c