Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbdH2Tf7 (ORCPT ); Tue, 29 Aug 2017 15:35:59 -0400 Received: from a2nlsmtp01-02.prod.iad2.secureserver.net ([198.71.225.36]:33218 "EHLO a2nlsmtp01-02.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237AbdH2Taj (ORCPT ); Tue, 29 Aug 2017 15:30:39 -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 06/19] CIFS: SMBD: Reconnect to SMBDirect session Date: Tue, 29 Aug 2017 12:29:02 -0700 Message-Id: <20170829192915.26251-7-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: MS4wfBEYj4fRHtCavFTSvu7phmxX2m3D0O6jDJoo4nUPN6SAIMEO2vfyu8cWaDdolOGNk04nvlLz2k/DsH4cbPafKVLl0754GBdxttNxKNMavD/4JbWeFliZ QiZhfL4yZvol/G5sINTvt2fCa4eZen72IICEzyC8omoxTCqnw0946UHocPlIGKCcqoX+6xvmKoZBixe6RIWTY3rzrc5Vh8UMZ9Cl3ORW1TvB+0AhmrScHjoT PKFNQIhugll/gWyRrOy/gbnlh25HmEt7og2BqNrOzhUcq8xUWdp5zvNKkcF6ChI1nspbXRPktE5BXqGF5QzTwrq0Cs8aa4HhhmXoZEyXQFzJQNYBdMK++BXS Dc6GTEjCb13xw5u6tBQJKO/XFt/BGqbUcguk3NFvv8K5f+VT6D2gnNqcE0dAfY0iCgvxdwZAYfTMkx3yMYNmva9YQWX0aT0sxRFyRYJTw6y4S8YuN0QiwLTm luyB1VAkUrY5QGyJ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 872 Lines: 30 From: Long Li Do a reconnect on SMBDirect when it is used as the connection. Reconnect can happen for many reasons and it's mostly the decision of upper layer SMB2 not SMBDirect. Signed-off-by: Long Li --- fs/cifs/connect.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 43b4d54..341a3fd 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -409,7 +409,11 @@ cifs_reconnect(struct TCP_Server_Info *server) /* we should try only the port we connected to before */ mutex_lock(&server->srv_mutex); - rc = generic_ip_connect(server); + if (server->rdma) + rc = smbd_reconnect(server); + else + rc = generic_ip_connect(server); + if (rc) { cifs_dbg(FYI, "reconnect error %d\n", rc); mutex_unlock(&server->srv_mutex); -- 2.7.4