From patchwork Tue Aug 29 19:29:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 9928109 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 B2FBD602B9 for ; Tue, 29 Aug 2017 19:35:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A65C928A3C for ; Tue, 29 Aug 2017 19:35:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B6F428A3F; Tue, 29 Aug 2017 19:35:27 +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 66E7B28A3C for ; Tue, 29 Aug 2017 19:35:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751670AbdH2Tao (ORCPT ); Tue, 29 Aug 2017 15:30:44 -0400 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:40436 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751629AbdH2Tam (ORCPT ); Tue, 29 Aug 2017 15:30:42 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id mmCidGHt5mlENmmCidUH2v; Tue, 29 Aug 2017 12:29:40 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1dmmCh-0006rg-Rn; Tue, 29 Aug 2017 12:29:39 -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 Cc: Long Li Subject: [Patch v3 07/19] CIFS: SMBD: Destroy SMBDirect session on shutdown or umount Date: Tue, 29 Aug 2017 12:29:03 -0700 Message-Id: <20170829192915.26251-8-longli@exchange.microsoft.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170829192915.26251-1-longli@exchange.microsoft.com> References: <20170829192915.26251-1-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfHGoDB1AYToknSpnwblUzwwPrRRkcs/7qmhwOC2ydNE9NprP5KtM/nohELTOwvKUu3bI7NPsEcJXrwwd6oIIULXnDV1+E9jdUHwI8gN51stA4CrScZt0 Mgr9Ke0gtY9cSCZ2v41CRAVCTG/vYRRSS84vka8fkaXx+cCg/3eglJD1nFS3tjITb8HpC5urJxIsV4US/7KZkM4OjEnUvvsK8BPKYutwxsLaTl039+oBKnkl 5OkkH4OWZYbfIWtCXDlycLa4Fne9mQ7j4ym4fkDO24uLumghbhUWvBb/C0sVrY7cJxswmF4aPnEbIZPHZL/oOMcXcb2SK8Oy2ULfFLqP2vZupPVlo4HL/+Oo foP1ZY4/2N1qtpcestdLyzXdLLGCMuUmibGl7Gwfsda+d7rgcmSl2xZrRqajElAAuQNlkK3Y52z5LK1n/CIk7SG9KOPB2f/dUKSpdxlrQEpG+g6pkaov3O9n gTtlBQ77ncSFl3Hj 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 CIFS wants to umount, call shutdown on transport when SMBDirect is used. Signed-off-by: Long Li --- fs/cifs/connect.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 341a3fd..4f62337 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->smbd_conn) { + smbd_destroy(server->smbd_conn); + server->smbd_conn = NULL; + } + if (server->ssocket) { sock_release(server->ssocket); server->ssocket = NULL;