Skip to content

Commit

Permalink
smb3: do not display empty interface list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steve French committed Jun 15, 2018
1 parent bea851b commit 115d5d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/cifs/cifs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
spin_unlock(&GlobalMid_Lock);

spin_lock(&ses->iface_lock);
seq_printf(m, "\n\tServer interfaces: %zu\n", ses->iface_count);
if (ses->iface_count)
seq_printf(m, "\n\tServer interfaces: %zu\n",
ses->iface_count);
for (j = 0; j < ses->iface_count; j++) {
seq_printf(m, "\t%d)\n", j);
cifs_dump_iface(m, &ses->iface_list[j]);
Expand Down

0 comments on commit 115d5d2

Please sign in to comment.