From patchwork Wed Aug 2 20:10:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 9877505 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C983A602BC for ; Wed, 2 Aug 2017 20:14:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9D40287EE for ; Wed, 2 Aug 2017 20:14:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACC8028800; Wed, 2 Aug 2017 20:14:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B65C287EE for ; Wed, 2 Aug 2017 20:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753226AbdHBUNX (ORCPT ); Wed, 2 Aug 2017 16:13:23 -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 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id czzKd3WIm80gSczzKdCUnw; Wed, 02 Aug 2017 13:11:26 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1dczzK-0005J5-Hd; Wed, 02 Aug 2017 13:11:26 -0700 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-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);