Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753271AbdHBUNZ (ORCPT ); Wed, 2 Aug 2017 16:13:25 -0400 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:48130 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753074AbdHBUM1 (ORCPT ); Wed, 2 Aug 2017 16:12:27 -0400 x-originating-ip: 107.180.71.197 From: Long Li To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org Cc: Long Li Subject: [[PATCH v1] 35/37] [CIFS] Destroy SMBD transport on exit Date: Wed, 2 Aug 2017 13:10:46 -0700 Message-Id: <1501704648-20159-36-git-send-email-longli@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> References: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfLTrSqnvflwxjhGnzGF27jlvOvSpGGCSkbDGudUAVNbfRIkns/d+GcoNeFfqXSsGvbwImBhay1vML1vlai1/W445+lnHf7JIIJwDCHaU3YgkitilrBHK VEGcDChT8je5E2rETVp0oSu32E7pv6S9DnBCkAKb6bmUSq2mhGdUzzmqe1pBPN1aR2EEMo/DBdwdMOVu79fh6zSA9y3jlYtU1NYS6QcpmjJp1AjW+/cRr0Gx TZi3/OM5QjnYq2qnAKzTM5Y5aHymv5Vo8qupclFm6NngLacAVjmnnPbDGRwDKFAfe3RtVMD+qYe70E7xnOSHXxmv9KPvIBN+4kezKLDihPE= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1055 Lines: 38 From: Long Li When SMBD is used in the SMB session, destroy it on exit. Signed-off-by: Long Li --- fs/cifs/connect.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 54c1f7c..cc58cd8 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -708,6 +708,11 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server) /* give those requests time to exit */ msleep(125); + if (server->rdma && server->rdma_ses) { + cifs_destroy_rdma_session(server->rdma_ses); + server->rdma_ses = NULL; + } + if (server->ssocket) { sock_release(server->ssocket); server->ssocket = NULL; @@ -2179,6 +2184,10 @@ cifs_put_tcp_session(struct TCP_Server_Info *server, int from_reconnect) return; } + if (server->rdma && server->rdma_ses) { + cifs_destroy_rdma_session(server->rdma_ses); + } + put_net(cifs_net_ns(server)); list_del_init(&server->tcp_ses_list); -- 2.7.4