CIFS: SMBD: Upper layer destroys SMB Direct session on shutdown or umount
authorLong Li <longli@microsoft.com>
Thu, 23 Nov 2017 00:38:38 +0000 (17:38 -0700)
committerSteve French <smfrench@gmail.com>
Thu, 25 Jan 2018 01:49:06 +0000 (19:49 -0600)
When upper layer wants to umount, make it call shutdown on transport when
SMB Direct is used.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/connect.c

index fc460663b308a76193aa385d80c3a963e85c7523..d8bfa89161e24bae64b96f97baf7e6077b2c6daa 100644 (file)
@@ -704,7 +704,10 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
        wake_up_all(&server->request_q);
        /* give those requests time to exit */
        msleep(125);
-
+       if (cifs_rdma_enabled(server) && server->smbd_conn) {
+               smbd_destroy(server->smbd_conn);
+               server->smbd_conn = NULL;
+       }
        if (server->ssocket) {
                sock_release(server->ssocket);
                server->ssocket = NULL;