diff mbox

[v2] CIFS: don't log STATUS_NOT_FOUND errors for DFS

Message ID 20171121134756.25201-1-aaptel@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Aurélien Aptel Nov. 21, 2017, 1:47 p.m. UTC
cifs.ko makes DFS queries regardless of the type of the server and
non-DFS servers are common. This often results in superfluous logging of
non-critical errors.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
---
v2: instead of always logging at FYI level, only log non-ENOENT errors
    at VFS level

 fs/cifs/smb2ops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Pavel Shilovskiy Nov. 21, 2017, 11:51 p.m. UTC | #1
2017-11-21 5:47 GMT-08:00 Aurelien Aptel <aaptel@suse.com>:
> cifs.ko makes DFS queries regardless of the type of the server and
> non-DFS servers are common. This often results in superfluous logging of
> non-critical errors.
>
> Signed-off-by: Aurelien Aptel <aaptel@suse.com>
> ---
> v2: instead of always logging at FYI level, only log non-ENOENT errors
>     at VFS level
>
>  fs/cifs/smb2ops.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 0dafdbae1f8c..3aa9f46c51e3 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1387,7 +1387,8 @@ smb2_get_dfs_refer(const unsigned int xid, struct cifs_ses *ses,
>         } while (rc == -EAGAIN);
>
>         if (rc) {
> -               cifs_dbg(VFS, "ioctl error in smb2_get_dfs_refer rc=%d\n", rc);
> +               if (rc != -ENOENT)
> +                       cifs_dbg(VFS, "ioctl error in smb2_get_dfs_refer rc=%d\n", rc);
>                 goto out;
>         }
>
> --
> 2.12.3
>
> --
> 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

Thanks!

Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>

--
Best regards,
Pavel Shilovsky
--
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
diff mbox

Patch

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 0dafdbae1f8c..3aa9f46c51e3 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1387,7 +1387,8 @@  smb2_get_dfs_refer(const unsigned int xid, struct cifs_ses *ses,
 	} while (rc == -EAGAIN);
 
 	if (rc) {
-		cifs_dbg(VFS, "ioctl error in smb2_get_dfs_refer rc=%d\n", rc);
+		if (rc != -ENOENT)
+			cifs_dbg(VFS, "ioctl error in smb2_get_dfs_refer rc=%d\n", rc);
 		goto out;
 	}