cifs: change ERRnomem error mapping from ENOMEM to EREMOTEIO
Subsystems (2)
PATCH 1/1 cifs: change ERRnomem error mapping from ENOMEM to EREMOTEIO
Sometimes, the server will report an error that basically indicates that it's running out of resources. These include these under SMB1:
NT_STATUS_NO_MEMORYNT_STATUS_SECTION_TOO_BIGNT_STATUS_TOO_MANY_PAGING_FILES
...and this one under SMB2:
STATUS_NO_MEMORY
Currently, this gets mapped to ENOMEM by the client, but that's confusing as an ENOMEM error is typically an indicator that the client is out of memory.
Change these errors to instead map to EREMOTEIO to indicate that the problem is actually server-side and not on the client.
--- fs/cifs/netmisc.c | 2 +- fs/cifs/smb2maperror.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/cifs/netmisc.c +1 -1
@@ -51,7 +51,7 @@ static const struct smb_to_posix_error mapping_table_ERRDOS[] = { {ERRnoaccess, -EACCES}, {ERRbadfid, -EBADF}, {ERRbadmcb, -EIO}, - {ERRnomem, -ENOMEM}, + {ERRnomem, -EREMOTEIO}, {ERRbadmem, -EFAULT}, {ERRbadenv, -EFAULT}, {ERRbadformat, -EINVAL},
fs/cifs/smb2maperror.c +1 -1
@@ -306,7 +306,7 @@ static const struct status_to_posix_error smb2_error_map_table[] = { {STATUS_NONEXISTENT_SECTOR, -EIO, "STATUS_NONEXISTENT_SECTOR"}, {STATUS_MORE_PROCESSING_REQUIRED, -EIO, "STATUS_MORE_PROCESSING_REQUIRED"}, - {STATUS_NO_MEMORY, -ENOMEM, "STATUS_NO_MEMORY"}, + {STATUS_NO_MEMORY, -EREMOTEIO, "STATUS_NO_MEMORY"}, {STATUS_CONFLICTING_ADDRESSES, -EADDRINUSE, "STATUS_CONFLICTING_ADDRESSES"}, {STATUS_NOT_MAPPED_VIEW, -EIO, "STATUS_NOT_MAPPED_VIEW"},
Signature · 1 line
1.8.3.1
A message that is not in the archive (sent off-list or not yet received): 1383854555-12043-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Quoted 2 lines · Jeff Layton
Sometimes, the server will report an error that basically indicates that it's running out of resources. These include these under SMB1:
[...]
Thank you for taking care of the issue so quickly.
Chiaki Ishikawa