summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-06-17 14:49:07 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-25 11:36:01 +0800
commit5293c79c6f60eafba13694bec1770b3c65507b99 (patch)
tree30aaa64142340fd5c8909247fa39276360d3ed51
parentdb7f1076c0bd26832ee3b94eccc1a815c7dac32d (diff)
downloadlinux-stable-5293c79c6f60eafba13694bec1770b3c65507b99.tar.gz
linux-stable-5293c79c6f60eafba13694bec1770b3c65507b99.tar.bz2
linux-stable-5293c79c6f60eafba13694bec1770b3c65507b99.zip
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>
-rw-r--r--fs/cifs/smb2maperror.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c
index 18814f1d67d9..3c0bad577859 100644
--- a/fs/cifs/smb2maperror.c
+++ b/fs/cifs/smb2maperror.c
@@ -457,7 +457,7 @@ static const struct status_to_posix_error smb2_error_map_table[] = {
{STATUS_FILE_INVALID, -EIO, "STATUS_FILE_INVALID"},
{STATUS_ALLOTTED_SPACE_EXCEEDED, -EIO,
"STATUS_ALLOTTED_SPACE_EXCEEDED"},
- {STATUS_INSUFFICIENT_RESOURCES, -EREMOTEIO,
+ {STATUS_INSUFFICIENT_RESOURCES, -EAGAIN,
"STATUS_INSUFFICIENT_RESOURCES"},
{STATUS_DFS_EXIT_PATH_FOUND, -EIO, "STATUS_DFS_EXIT_PATH_FOUND"},
{STATUS_DEVICE_DATA_ERROR, -EIO, "STATUS_DEVICE_DATA_ERROR"},