Skip to content

Commit 66eb0c6

Browse files
sprasad-microsoftsmfrench
authored andcommitted
cifs: adjust DebugData to use chans_need_reconnect for conn status
Use ses->chans_need_reconnect bitmask to print the connection status of each channel under an SMB session. Signed-off-by: Shyam Prasad N <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent f486ef8 commit 66eb0c6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fs/cifs/cifs_debug.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,17 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
416416
from_kuid(&init_user_ns, ses->cred_uid));
417417

418418
spin_lock(&ses->chan_lock);
419+
if (CIFS_CHAN_NEEDS_RECONNECT(ses, 0))
420+
seq_puts(m, "\tPrimary channel: DISCONNECTED ");
421+
419422
if (ses->chan_count > 1) {
420423
seq_printf(m, "\n\n\tExtra Channels: %zu ",
421424
ses->chan_count-1);
422-
for (j = 1; j < ses->chan_count; j++)
425+
for (j = 1; j < ses->chan_count; j++) {
423426
cifs_dump_channel(m, j, &ses->chans[j]);
427+
if (CIFS_CHAN_NEEDS_RECONNECT(ses, j))
428+
seq_puts(m, "\tDISCONNECTED ");
429+
}
424430
}
425431
spin_unlock(&ses->chan_lock);
426432

0 commit comments

Comments
 (0)