summaryrefslogtreecommitdiff
path: root/fs/smb/client/cifs_debug.c
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2023-10-13 12:25:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-01 03:18:48 +0300
commitc395f798a7f2ef3374a637bafac28af983eb0497 (patch)
treea98212fbb13b9c0d45f57b9bf9c478af6fce485d /fs/smb/client/cifs_debug.c
parent38298acb7899b119f9643c8d7db00b126a72a0d5 (diff)
downloadlinux-c395f798a7f2ef3374a637bafac28af983eb0497.tar.xz
cifs: handle cases where a channel is closed
[ Upstream commit 0c51cc6f2cb0108e7d49805f6e089cd85caab279 ] So far, SMB multichannel could only scale up, but not scale down the number of channels. In this series of patch, we now allow the client to deal with the case of multichannel disabled on the server when the share is mounted. With that change, we now need the ability to scale down the channels. This change allows the client to deal with cases of missing channels more gracefully. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com> Stable-dep-of: 78e727e58e54 ("cifs: update iface_last_update on each query-and-update") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/smb/client/cifs_debug.c')
-rw-r--r--fs/smb/client/cifs_debug.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index a2584ad8808a..3230ed7eadde 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -138,6 +138,11 @@ cifs_dump_channel(struct seq_file *m, int i, struct cifs_chan *chan)
{
struct TCP_Server_Info *server = chan->server;
+ if (!server) {
+ seq_printf(m, "\n\n\t\tChannel: %d DISABLED", i+1);
+ return;
+ }
+
seq_printf(m, "\n\n\t\tChannel: %d ConnectionId: 0x%llx"
"\n\t\tNumber of credits: %d,%d,%d Dialect 0x%x"
"\n\t\tTCP status: %d Instance: %d"