Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751793AbdH2Taw (ORCPT ); Tue, 29 Aug 2017 15:30:52 -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 S1751646AbdH2Tan (ORCPT ); Tue, 29 Aug 2017 15:30:43 -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 09/19] CIFS: SMBD: Receive data from SMBDirect Date: Tue, 29 Aug 2017 12:29:05 -0700 Message-Id: <20170829192915.26251-10-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: MS4wfMYEnzlexQLengg9BBKKnHiBGCRY4qWZHnidkOBgBbYtZXTFPuPjX3mqyiUgLIJSBEc27F4TcEirzuNt7dZIaiZEqMknzQheUteSOTXkm+qnnaeZlaVo qQUcpPTKVbXqZrLcizOUcr9YE2AnUlABUa2pXukGCpoNwU7r8vUowcEwCrbRmQuNf9WA19TOygaepQPZXTPBEdtrtxKBJZoRKVR3U/geVR/0wMidzVkRZrRi kAwRiCHDjakpZj7+ClsIJfmCcIswjEqWDjypXU4/cXwC6Vnyp2R2/gWD68ZCNscac4zvTNuecbQNjtcvZtN9CWpM2SRRpFwtIpheNJk3KmaR4HqEm+lheFkO AhvmmoH0vIqh4XT1r9JLgKbEozlRvLuUTh9Oh4v1jSPoBwuDuq7tEZxqZIb7gpNdxhS7Hn/UZUZa9Qw0BbIzIZk2EhhMJF7Lq2WouYRFg1I/tq21PHma7VzO 2TRKBxPJ7u5GdfQ/ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 800 Lines: 27 From: Long Li With SMBDirect connected, use it for receiving data via RDMA recv. 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 4f62337..29f384f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -546,7 +546,10 @@ cifs_readv_from_socket(struct TCP_Server_Info *server, struct msghdr *smb_msg) if (server_unresponsive(server)) return -ECONNABORTED; - length = sock_recvmsg(server->ssocket, smb_msg, 0); + if (server->smbd_conn) + length = smbd_recv(server->smbd_conn, smb_msg); + else + length = sock_recvmsg(server->ssocket, smb_msg, 0); if (server->tcpStatus == CifsExiting) return -ESHUTDOWN; -- 2.7.4