summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2022-06-14 13:47:24 +0200
committerSteve French <stfrench@microsoft.com>2022-06-18 21:55:06 +0200
commit5d24968f5b7e00bae564b1646c3b9e0e3750aabe (patch)
treeab189878927bcdcbf49146b089d759cbb39ab5d2 /fs
parentsmb3: add trace point for SMB2_set_eof (diff)
downloadlinux-5d24968f5b7e00bae564b1646c3b9e0e3750aabe.tar.xz
linux-5d24968f5b7e00bae564b1646c3b9e0e3750aabe.zip
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 <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/sess.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 0bece97547d4..d417de354d9d 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -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;
}