From patchwork Wed Jan 23 21:10:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 10777893 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 270B36C2 for ; Wed, 23 Jan 2019 21:11:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1866C2D7AB for ; Wed, 23 Jan 2019 21:11:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B52C2D7B2; Wed, 23 Jan 2019 21:11:03 +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 B7D312D7AB for ; Wed, 23 Jan 2019 21:11:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726821AbfAWVLC (ORCPT ); Wed, 23 Jan 2019 16:11:02 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:43077 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbfAWVLC (ORCPT ); Wed, 23 Jan 2019 16:11:02 -0500 Received: by mail-pl1-f196.google.com with SMTP id gn14so1772154plb.10 for ; Wed, 23 Jan 2019 13:11:02 -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=RsgRSpvExNJ6oPOM2yNm0dGybgJapo/l9FMQY0v/ZCw=; b=D6oNvJAegrTqzsJa86fE5fA3gz0uGf93HaFs/LEvpLAU/0p5iIqPnpI/UR2pSBiICi lvaBfQU1sbf7X1hb1sELRXTqiJXlDGh04NZvjregPDyKeFeOzc+Y81zAcr5Cmwa8yRBe +IpGKWtt8FKGuzmFJBwCfKwW+2b86mGeQ28tB9EMaaPuWRjE840KtQzBGh3dMIAEci1B YFsN+Vr3RqAR2hPF0vyemjCf9EM+gqyyao9atEhT4CvRymEiOMu68VgRD38X17dufy2N 1PvbDd46/niWZkbOa0KwP9OxmmnwUqp2ZcLatgn3Pr3QMKsE4rk5mz+DCW/sP1y0scT2 omCQ== 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=RsgRSpvExNJ6oPOM2yNm0dGybgJapo/l9FMQY0v/ZCw=; b=B0tP1Xleu9nXpRGCIK1hiWUHVutSfNQlgvDlpe9FSqB0wz4CuIYGrxHtPqp/tnZKkq pr001+k2DET/IkqwhdgYCJppFU3PbktiTATLuYWCAhejAlWcGRr3p/KZFOfQaDidcDYj tP8hyIOiU7uPv4n6wwLIHtyxmckAKhDkb91ut+tS62o2QUYM1sJvDAUat4ckKAlHnjgg uVwLou/JP9mYeSsPMueLn/TE+bFNBxSwTxARmUmUAicAuRaIGATyCO06tq+tWFKp3jdr 4jiZYJ9/j7mlXdSx5kwyBZGBKsbvVqdk6+RyYDAV6IS94b9aPpEfyFTCgonXKdaZrZ6E Q4ow== X-Gm-Message-State: AJcUukeu8OA8lUF0GwpCQW4kzztBQ78DfMJ3zuIC6wRgPJp0JA1XiJI3 WhYWw+j43xeS6BaN2eaIN/TbgpI= X-Google-Smtp-Source: ALg8bN79Pqy4OKlrXSGyX3Pqqtr9kA6IaIk6pLF8/uDlW2Ga25biu2qoSAivVqwDn1N+Gm5F06gThQ== X-Received: by 2002:a17:902:2e01:: with SMTP id q1mr3751966plb.97.1548277861312; Wed, 23 Jan 2019 13:11:01 -0800 (PST) Received: from ubuntu-vm.corp.microsoft.com ([2001:4898:80e8:f:a17f:4e9f:6b7c:507d]) by smtp.gmail.com with ESMTPSA id n73sm28063714pfj.148.2019.01.23.13.11.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Jan 2019 13:11:00 -0800 (PST) From: Pavel Shilovsky X-Google-Original-From: Pavel Shilovsky To: linux-cifs@vger.kernel.org, Steve French , Ronnie Sahlberg Subject: [PATCH 07/15] CIFS: Always reset read error to -EIO if no response Date: Wed, 23 Jan 2019 13:10:37 -0800 Message-Id: <1548277845-6746-8-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548277845-6746-1-git-send-email-pshilov@microsoft.com> References: <1548277845-6746-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 --- 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 9bd7f3d..6d2901b 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -3196,8 +3196,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 /*