]> www.infradead.org Git - users/hch/xfs.git/commitdiff
smb: client: fix noisy when tree connecting to DFS interlink targets
authorPaulo Alcantara <pc@manguebit.com>
Wed, 5 Feb 2025 16:22:11 +0000 (13:22 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 6 Feb 2025 03:09:03 +0000 (21:09 -0600)
When the client attempts to tree connect to a domain-based DFS
namespace from a DFS interlink target, the server will return
STATUS_BAD_NETWORK_NAME and the following will appear on dmesg:

CIFS: VFS:  BAD_NETWORK_NAME: \\dom\dfs

Since a DFS share might contain several DFS interlinks and they expire
after 10 minutes, the above message might end up being flooded on
dmesg when mounting or accessing them.

Print this only once per share.

Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2pdu.c

index 40ad9e79437a4ba0d8a9d4374c8b163b4de08504..78395195e01654452e31438963cb44c022e7b113 100644 (file)
@@ -2169,7 +2169,7 @@ tcon_exit:
 
 tcon_error_exit:
        if (rsp && rsp->hdr.Status == STATUS_BAD_NETWORK_NAME)
-               cifs_tcon_dbg(VFS, "BAD_NETWORK_NAME: %s\n", tree);
+               cifs_dbg(VFS | ONCE, "BAD_NETWORK_NAME: %s\n", tree);
        goto tcon_exit;
 }