From patchwork Fri Apr 5 21:36:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 10887855 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A8FA15AC for ; Fri, 5 Apr 2019 21:37:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7390E2872E for ; Fri, 5 Apr 2019 21:37:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 646D628A3D; Fri, 5 Apr 2019 21:37:53 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham 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 1F7B32872E for ; Fri, 5 Apr 2019 21:37:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726388AbfDEVhw (ORCPT ); Fri, 5 Apr 2019 17:37:52 -0400 Received: from a2nlsmtp01-03.prod.iad2.secureserver.net ([198.71.225.37]:53672 "EHLO a2nlsmtp01-03.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbfDEVhw (ORCPT ); Fri, 5 Apr 2019 17:37:52 -0400 Received: from linuxonhyperv2.linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with ESMTP id CWW3hh1bJiCMnCWW3howuv; Fri, 05 Apr 2019 14:36:51 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv2.linuxonhyperv.com with local (Exim 4.91) (envelope-from ) id 1hCWW3-0006Mo-EN; Fri, 05 Apr 2019 14:36:51 -0700 From: Long Li To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org Cc: Long Li Subject: [Patch (resend) 2/5] cifs: smbd: Return EINTR when interrupted Date: Fri, 5 Apr 2019 21:36:32 +0000 Message-Id: <20190405213635.24383-2-longli@linuxonhyperv.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190405213635.24383-1-longli@linuxonhyperv.com> References: <20190405213635.24383-1-longli@linuxonhyperv.com> MIME-Version: 1.0 Reply-To: longli@microsoft.com X-CMAE-Envelope: MS4wfLzAwzddYY7LJmHGB1C1t3zdyDnB1TP6Pl1jIw9atxoETD9y7YSSUrrwB3fl/or6YSao52twPVZyFQVp0fssxAULasZOIZBujFPJMH6DwY14oDBV+kye 57mMo0h6BN++thkrdO84xVv6dTa95EZpUxMkJVYKydu/lHEm6q/heoxxm+O0zYxkqLfxwx/Juxp2jdRiUO3zfx2OlyoPWxkAQveK8I8lAdrpEMN9Yes6OXt7 cGPtl8SMsoel3w8cAjkD/otb+JX3b2xcIt/6uvgOzMSjAJKK7PzVzFd7MtXme2r9OLFWcGLYQ3x19+GLY9mbDXhkqXitx3e6cd2PgLIkzxeS68uqD/pJ2Ud/ jtCwYrvhMvJ/W2bHO0IxEUBFKsijig== 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 packets are waiting for outbound I/O and interrupted, return the proper error code to user process. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c index 7259427..df95c75 100644 --- a/fs/cifs/smbdirect.c +++ b/fs/cifs/smbdirect.c @@ -1972,7 +1972,7 @@ static int smbd_recv_buf(struct smbd_connection *info, char *buf, info->transport_status != SMBD_CONNECTED); /* Don't return any data if interrupted */ if (rc) - return -ENODEV; + return rc; if (info->transport_status != SMBD_CONNECTED) { log_read(ERR, "disconnected\n");