Skip to content

Commit 5d24968

Browse files
sprasad-microsoftsmfrench
authored andcommitted
cifs: when a channel is not found for server, log its connection id
cifs_ses_get_chan_index gets the index for a given server pointer. When a match is not found, we warn about a possible bug. However, printing details about the non-matching server could be more useful to debug here. Signed-off-by: Shyam Prasad N <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 7c05eae commit 5d24968

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/cifs/sess.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ cifs_ses_get_chan_index(struct cifs_ses *ses,
8181
}
8282

8383
/* If we didn't find the channel, it is likely a bug */
84+
if (server)
85+
cifs_dbg(VFS, "unable to get chan index for server: 0x%llx",
86+
server->conn_id);
8487
WARN_ON(1);
8588
return 0;
8689
}

0 commit comments

Comments
 (0)