diff mbox series

[SMB3] Don't log expected error on DFS referral request

Message ID CAH2r5mtPp5A1KXE7mVn8pzTV16EmT4PwAjPLEHiECAjsWBj7eQ@mail.gmail.com
State New
Headers show
Series [SMB3] Don't log expected error on DFS referral request | expand

Commit Message

Steve French March 22, 2018, 4:28 a.m. UTC
STATUS_FS_DRIVER_REQUIRED is expected when DFS is not turned
on on the server.  Do not log it on DFS referral response.
It clutters the dmesg log unnecessarily at mount time.

Comments

Aurélien Aptel March 22, 2018, 12:09 p.m. UTC | #1
Steve French <smfrench@gmail.com> writes:
> STATUS_FS_DRIVER_REQUIRED is expected when DFS is not turned
> on on the server.  Do not log it on DFS referral response.
> It clutters the dmesg log unnecessarily at mount time.

Yes I've noticed this on windows server 2016. Looks good to me.

Reviewed-by: Aurelien Aptel <aaptel@suse.com>
diff mbox series

Patch

From fe24ab67e94e33b9673ad2ba9a56325baac2f7f7 Mon Sep 17 00:00:00 2001
From: Steve French <smfrench@gmail.com>
Date: Wed, 21 Mar 2018 23:16:36 -0500
Subject: [PATCH] [SMB3] Don't log expected error on DFS referral request

STATUS_FS_DRIVER_REQUIRED is expected when DFS is not turned
on on the server.  Do not log it on DFS referral response.
It clutters the dmesg log unnecessarily at mount time.

Signed-off-by: Steve French <smfrench@gmail.com>
---
 fs/cifs/smb2maperror.c | 2 +-
 fs/cifs/smb2ops.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c
index 62c88dfed57b..3bfc9c990724 100644
--- a/fs/cifs/smb2maperror.c
+++ b/fs/cifs/smb2maperror.c
@@ -745,7 +745,7 @@  static const struct status_to_posix_error smb2_error_map_table[] = {
 	"STATUS_NOLOGON_SERVER_TRUST_ACCOUNT"},
 	{STATUS_DOMAIN_TRUST_INCONSISTENT, -EIO,
 	"STATUS_DOMAIN_TRUST_INCONSISTENT"},
-	{STATUS_FS_DRIVER_REQUIRED, -EIO, "STATUS_FS_DRIVER_REQUIRED"},
+	{STATUS_FS_DRIVER_REQUIRED, -EOPNOTSUPP, "STATUS_FS_DRIVER_REQUIRED"},
 	{STATUS_IMAGE_ALREADY_LOADED_AS_DLL, -EIO,
 	"STATUS_IMAGE_ALREADY_LOADED_AS_DLL"},
 	{STATUS_NETWORK_OPEN_RESTRICTION, -EIO,
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index dfd6fb02b7a3..c5777783f313 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1412,7 +1412,7 @@  smb2_get_dfs_refer(const unsigned int xid, struct cifs_ses *ses,
 	} while (rc == -EAGAIN);
 
 	if (rc) {
-		if (rc != -ENOENT)
+		if ((rc != -ENOENT) && (rc != -EOPNOTSUPP))
 			cifs_dbg(VFS, "ioctl error in smb2_get_dfs_refer rc=%d\n", rc);
 		goto out;
 	}
-- 
2.14.1