Skip to content

Commit 85f9987

Browse files
author
Steve French
committed
fix incorrect error code mapping for OBJECTID_NOT_FOUND
It was mapped to EIO which can be confusing when user space queries for an object GUID for an object for which the server file system doesn't support (or hasn't saved one). As Amir Goldstein suggested this is similar to ENOATTR (equivalently ENODATA in Linux errno definitions) so changing NT STATUS code mapping for OBJECTID_NOT_FOUND to ENODATA. Signed-off-by: Steve French <stfrench@microsoft.com> CC: Amir Goldstein <amir73il@gmail.com>
1 parent b073a08 commit 85f9987

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/cifs/smb2maperror.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,8 @@ static const struct status_to_posix_error smb2_error_map_table[] = {
10361036
{STATUS_UNFINISHED_CONTEXT_DELETED, -EIO,
10371037
"STATUS_UNFINISHED_CONTEXT_DELETED"},
10381038
{STATUS_NO_TGT_REPLY, -EIO, "STATUS_NO_TGT_REPLY"},
1039-
{STATUS_OBJECTID_NOT_FOUND, -EIO, "STATUS_OBJECTID_NOT_FOUND"},
1039+
/* Note that ENOATTTR and ENODATA are the same errno */
1040+
{STATUS_OBJECTID_NOT_FOUND, -ENODATA, "STATUS_OBJECTID_NOT_FOUND"},
10401041
{STATUS_NO_IP_ADDRESSES, -EIO, "STATUS_NO_IP_ADDRESSES"},
10411042
{STATUS_WRONG_CREDENTIAL_HANDLE, -EIO,
10421043
"STATUS_WRONG_CREDENTIAL_HANDLE"},

0 commit comments

Comments
 (0)