From patchwork Thu Nov 23 00:38:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 10072141 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 CCA2160595 for ; Thu, 23 Nov 2017 00:41:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEA9B29DBF for ; Thu, 23 Nov 2017 00:41:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B386429DC8; Thu, 23 Nov 2017 00:41:04 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 54F8229DBF for ; Thu, 23 Nov 2017 00:41:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751824AbdKWAkS (ORCPT ); Wed, 22 Nov 2017 19:40:18 -0500 Received: from a2nlsmtp01-03.prod.iad2.secureserver.net ([198.71.225.37]:49490 "EHLO a2nlsmtp01-03.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751761AbdKWAkR (ORCPT ); Wed, 22 Nov 2017 19:40:17 -0500 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id HfXbeuu2CNCjBHfXbeqkx7; Wed, 22 Nov 2017 17:39:15 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1eHfXb-0004T2-DA; Wed, 22 Nov 2017 17:38:55 -0700 From: Long Li To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Christoph Hellwig , Tom Talpey , Matthew Wilcox , Stephen Hemminger Cc: Long Li Subject: [Patch v8 05/16] CIFS: SMBD: Upper layer destroys SMB Direct session on shutdown or umount Date: Wed, 22 Nov 2017 17:38:38 -0700 Message-Id: <20171123003849.17093-6-longli@exchange.microsoft.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171123003849.17093-1-longli@exchange.microsoft.com> References: <20171123003849.17093-1-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfEbZKhQiHN8OLB28r3CvcgqLLfjDxLESX+ahKVs3OiynOvtldvmSlEp1r2OHeDxi7RmbX3+k5HBORgrVtxUS5jehYlBlPauU1hMxdwdTTIBbZXi19vxo i7yguTPDS0OKPvf/CPDuN9hqFGKQWQipim7LZJkcYqOgmHhIoZg/PPGuEsi1Lh+prktIMYtwis153HCUPz2MTsD8sWKgNgvJt1qxvJAK84O9zv/Py4m0vCeK W3aFFxcRBypKIuxmVYPuPwnmtvoZVLjrdfgvpJhEtXjVA58Ejnxk7JJYIrwpzxbFR+kkUIrV8Gf2yoeIFAj+KVQ67pgCe0FHy+1c6kOKqeQ1l77JIVbJnFY1 CzVpLjpHPqcgcMjQncpSFpa/ijYwtbLyZE/lSTfjxMci2lNPgOvZ6juKtAKqZmLE9kAHq32KQh6tM8rd+0SuW+3OOkcV8wCdQM3mC+l9zDScZj+TDq9BVvkt 7QZ0pPjh0m6I+lHiqJFfDMM+zqjwLNXHr6jBBQ== 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 upper layer wants to umount, make it call shutdown on transport when SMB Direct is used. Signed-off-by: Long Li --- fs/cifs/connect.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index fc46066..d8bfa89 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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;