From patchwork Fri Feb 1 20:03:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 10793655 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 0C7A41390 for ; Fri, 1 Feb 2019 20:04:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F36E232C9E for ; Fri, 1 Feb 2019 20:04:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8014330BE; Fri, 1 Feb 2019 20:04:31 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 A29E032C9E for ; Fri, 1 Feb 2019 20:04:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730671AbfBAUEb (ORCPT ); Fri, 1 Feb 2019 15:04:31 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43843 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730629AbfBAUEb (ORCPT ); Fri, 1 Feb 2019 15:04:31 -0500 Received: by mail-pf1-f195.google.com with SMTP id w73so3727057pfk.10 for ; Fri, 01 Feb 2019 12:04:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=bE5ua07h59ttEc4rK9jgyEkfZdFMv9mZ6rTxJ6EFKro=; b=S5TBgu+8D51Cn+jikD1QG+neEJJzPmTuyMRo4y75B81YVDUMeQctdDc3Yl75407eKu UGLYNF4851yfpS5rc5MGMCJpaY2SWYmQuIHL43ueYTq2bP8is7qCD1DqjvQK2qdgbY47 8tk9bityRt4ZOq8qqUXcv0ZLApvb4BBE4ZCKBk8xQVh0zsmO9MYLucwa6Qj+0sCTDuXR +lqrxKN+nlug99cf7ipHizlH+yyTaBUKRvz1BeicG/ozlkC5PRxZ+4oMHE0JG/54rVMh FSgK2Ya5l1yqxo5vcb6HrOWqCR3lwpyJKvMkdPs8xnvOmQyOoajNxHsIpMCFFujPPkHj NUgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=bE5ua07h59ttEc4rK9jgyEkfZdFMv9mZ6rTxJ6EFKro=; b=BrNV6ytsEjBI5XDB2qIj4AlpdAUd763zldpZr8EJ8hU+TLwbDFSabaP8TfSeogyeH3 Mf9XAPCZRdQ9Dsg31bipt2PTq2oi+ZiDZh4LlOjiCPRwrh1vGUCqV9GBB5h6Qzk+gE8I 5PnxOM8W7KX3WgV5GrpYmvsGwV4pAYCKK4SPkr67fcuKX+3gz9GjDynG5t5A0cipC73x FPVx/RI1uRimXi4wjmZypWIH3ZtxMI7OmEXqcEUDlgwJYcaJU+NehwMHj6XivPnR06Of 2f6tZSDFducXrxoMTD0bDe22atbgQOlev+lgFKJtyhP7jrsbKk+jTYtbnfbrf4RjmLU7 Q33g== X-Gm-Message-State: AHQUAuZ/cKtib68OqhmWvvo5Ocwp85b9JZpocsYwgrWEQFAbELFXIhCd aOuj27uTcxYkBMZ/KF58693x8Fw= X-Google-Smtp-Source: AHgI3IYnN5e1TL/ed8GP8Y4cceTZDi0+vCLN91atGhzLh9wzcc/LH+6AAYkm8Qt236IlBRR9fBFINA== X-Received: by 2002:a63:2c0e:: with SMTP id s14mr3597530pgs.132.1549051469295; Fri, 01 Feb 2019 12:04:29 -0800 (PST) Received: from ubuntu-vm.corp.microsoft.com ([2001:4898:80e8:0:a18e:4e9f:6b7c:507d]) by smtp.gmail.com with ESMTPSA id x11sm24247451pfe.72.2019.02.01.12.04.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Feb 2019 12:04:28 -0800 (PST) From: Pavel Shilovsky X-Google-Original-From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Subject: [PATCH 06/23] CIFS: Always reset read error to -EIO if no response Date: Fri, 1 Feb 2019 12:03:54 -0800 Message-Id: <1549051452-5968-7-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549051452-5968-1-git-send-email-pshilov@microsoft.com> References: <1549051452-5968-1-git-send-email-pshilov@microsoft.com> 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 Currently we skip setting a read error to -EIO if a stored result is -ENODATA and a response hasn't been received. With the recent changes in read error processing there shouldn't be cases when -ENODATA is set without a response from the server, so reset the error to -EIO unconditionally. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French --- fs/cifs/smb2pdu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index ef52d66..18f0177 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -3227,8 +3227,7 @@ smb2_readv_callback(struct mid_q_entry *mid) credits_received = le16_to_cpu(shdr->CreditRequest); /* fall through */ default: - if (rdata->result != -ENODATA) - rdata->result = -EIO; + rdata->result = -EIO; } #ifdef CONFIG_CIFS_SMB_DIRECT /*