[SMB3] remove noisy warning message on mount

Message ID CAH2r5msMyc_q02VoRi4xkDeTLpgjB8dN7zCip7m1XxQWOSCddA@mail.gmail.com
State New
Headers show
Series
  • [SMB3] remove noisy warning message on mount
Related show

Commit Message

Steve French June 29, 2018, 3:57 a.m.
If query interface info returns error not supported (as it does to Samba eg.)
don't log a noisy warning on every mount - change to an FYI level so doesn't
clutter the logs.

Comments

Aurélien Aptel June 29, 2018, 5:57 a.m. | #1
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Sachin Prabhu July 2, 2018, 7:56 a.m. | #2
On Thu, 2018-06-28 at 22:57 -0500, Steve French wrote:
> [PATCH] smb3: remove noisy warning message on mount
> 
> Some servers, like Samba, don't support the fsctl for
> query_network_interface_info so don't log a noisy warning
> message on mount for this by default unless the error is more
> serious.
> Lower the error to an FYI level so it does not get logged by
> default.
> 
> Signed-off-by: Steve French <stfrench@microsoft.com>

Acked-by: Sachin Prabhu <sprabhu@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

From 32cb62e7b6a83a4d95d512e25ac870dd84e410bc Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Thu, 28 Jun 2018 22:53:39 -0500
Subject: [PATCH] smb3: remove noisy warning message on mount

Some servers, like Samba, don't support the fsctl for
query_network_interface_info so don't log a noisy warning
message on mount for this by default unless the error is more serious.
Lower the error to an FYI level so it does not get logged by
default.

Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/smb2ops.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index f80cc376b18e..66d7de1370ce 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -444,7 +444,11 @@  SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon)
 			FSCTL_QUERY_NETWORK_INTERFACE_INFO, true /* is_fsctl */,
 			NULL /* no data input */, 0 /* no data input */,
 			(char **)&out_buf, &ret_data_len);
-	if (rc != 0) {
+	if (rc == -EOPNOTSUPP) {
+		cifs_dbg(FYI,
+			 "server does not support query network interfaces\n");
+		goto out;
+	} else if (rc != 0) {
 		cifs_dbg(VFS, "error %d on ioctl to get interface list\n", rc);
 		goto out;
 	}
-- 
2.17.1