| From c9dc520959071f7d3430d2a3081ff657e9288332 Mon Sep 17 00:00:00 2001 |
| From: Long Li <longli@microsoft.com> |
| Date: Wed, 16 Oct 2019 13:51:50 -0700 |
| Subject: [PATCH] cifs: Don't display RDMA transport on reconnect |
| |
| commit 14cc639c17ab0b6671526a7459087352507609e4 upstream. |
| |
| On reconnect, the transport data structure is NULL and its information is not |
| available. |
| |
| Signed-off-by: Long Li <longli@microsoft.com> |
| Cc: stable@vger.kernel.org |
| Signed-off-by: Steve French <stfrench@microsoft.com> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c |
| index ec933fb0b36e..e6247b124e63 100644 |
| --- a/fs/cifs/cifs_debug.c |
| +++ b/fs/cifs/cifs_debug.c |
| @@ -258,6 +258,11 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v) |
| if (!server->rdma) |
| goto skip_rdma; |
| |
| + if (!server->smbd_conn) { |
| + seq_printf(m, "\nSMBDirect transport not available"); |
| + goto skip_rdma; |
| + } |
| + |
| seq_printf(m, "\nSMBDirect (in hex) protocol version: %x " |
| "transport status: %x", |
| server->smbd_conn->protocol, |
| -- |
| 2.7.4 |
| |