Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751695AbdH2Tap (ORCPT ); Tue, 29 Aug 2017 15:30:45 -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 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, 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 699 Lines: 27 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; -- 2.7.4