Skip to content

Commit

Permalink
cifs: when a channel is not found for server, log its connection id
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sprasad-microsoft authored and Steve French committed Jun 18, 2022
1 parent 7c05eae commit 5d24968
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/cifs/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ cifs_ses_get_chan_index(struct cifs_ses *ses,
}

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

0 comments on commit 5d24968

Please sign in to comment.