cifs: Don't display RDMA transport on reconnect
authorLong Li <longli@microsoft.com>
Wed, 16 Oct 2019 20:51:50 +0000 (13:51 -0700)
committerSteve French <stfrench@microsoft.com>
Mon, 25 Nov 2019 07:14:14 +0000 (01:14 -0600)
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>
fs/cifs/cifs_debug.c

index 0b4eee3..efb2928 100644 (file)
@@ -256,6 +256,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,