aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2018-06-14 22:59:31 -0400
committerSteve French <stfrench@microsoft.com>2018-06-15 03:38:08 -0400
commit115d5d288dc3368e3d6e7eb9ee213b342f072c23 (patch)
tree68e7389c243292aada6e9c9c2e53276f8f341f30
parentbea851b8babe6c87c36e97c9de0dd0bea0dd5802 (diff)
smb3: do not display empty interface list
If server does not support listing interfaces then do not display empty "Server interfaces" line to avoid confusing users. Signed-off-by: Steve French <stfrench@microsoft.com> CC: Aurelien Aptel <aaptel@suse.com>
-rw-r--r--fs/cifs/cifs_debug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index e8db245194e7..bfe999505815 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -333,7 +333,9 @@ skip_rdma:
333 spin_unlock(&GlobalMid_Lock); 333 spin_unlock(&GlobalMid_Lock);
334 334
335 spin_lock(&ses->iface_lock); 335 spin_lock(&ses->iface_lock);
336 seq_printf(m, "\n\tServer interfaces: %zu\n", ses->iface_count); 336 if (ses->iface_count)
337 seq_printf(m, "\n\tServer interfaces: %zu\n",
338 ses->iface_count);
337 for (j = 0; j < ses->iface_count; j++) { 339 for (j = 0; j < ses->iface_count; j++) {
338 seq_printf(m, "\t%d)\n", j); 340 seq_printf(m, "\t%d)\n", j);
339 cifs_dump_iface(m, &ses->iface_list[j]); 341 cifs_dump_iface(m, &ses->iface_list[j]);