[PATCH][SMB3] Fix incorrect status to errno code mapping for OBJECTID_NOT_FOUND

Steve French smfrench at gmail.com
Sun Mar 17 21:06:24 UTC 2019

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

Signed-off-by: Steve French <stfrench at microsoft.com>
CC: Amir Goldstein <amir73il at gmail.com>
 fs/cifs/smb2maperror.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c
index 924269cec135..e32c264e3adb 100644
--- a/fs/cifs/smb2maperror.c
+++ b/fs/cifs/smb2maperror.c
@@ -1036,7 +1036,8 @@ static const struct status_to_posix_error
smb2_error_map_table[] = {
+    /* Note that ENOATTTR and ENODATA are the same errno */


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-SMB3-fix-incorrect-error-code-mapping-for-OBJECTID_N.patch
Type: text/x-patch
Size: 1495 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190317/9c553645/0001-SMB3-fix-incorrect-error-code-mapping-for-OBJECTID_N.bin>

More information about the samba-technical mailing list