Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2188052iof; Tue, 7 Jun 2022 22:35:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqdgqDORE6wO4intaawI6FVldgrY1lKNuZjAdBjE4jdQaRVtpWFsUbQYGf9uqVVauxDd1q X-Received: by 2002:a17:903:1104:b0:15f:bce:1a0c with SMTP id n4-20020a170903110400b0015f0bce1a0cmr32407690plh.149.1654666555471; Tue, 07 Jun 2022 22:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654666555; cv=none; d=google.com; s=arc-20160816; b=RGNug5NccvOZq3Ygwh3UcwF41nqR0l9UtyTqBPagYo8/+N8L+uIQrrZE3IW3Y4iq6G nzhFV2XigCGSV+8sO/9VCdPlHbP3Trlv1GY65tH8q0kEBq+ZlNzrvyIy1o/gxiTYmaK0 FFRQsUrT4uXGf72ITTV0WuOtqWsa8BIo0joIoKlqlvIHnpCHGf8WDgViiYPUp5JSh6/V 4tOWj8oyquRgmFYHzsCXgtifI9U6rgG3hCzmNCwkQRYRRwyKL9HrdhePDCCf65nbH1IN 9NcfzRmSzYggXFhMb0b5kNUm67n4t31DlMTKE2JfdqM00bB65/FrRIRuy0fKQ0DoXi9T E54g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ei1ibBwQTDTaRm+R6reBtQWeInplSWetpkRWOB7Ffn4=; b=dwXH++Ye7AfRtv6ulw8hPqFCwCQB8Ln+SGxjMygo5/HfnVyeA5ZrBCfMgja653d7kx 0kZbAZWoGlX4uAeG8DeOkRgCkKsKB44IZ6mL/9RNfK3xlZ/v9lcnCWNzPG6Ff6rNjDwm OkIHwgkZjYKDj0rlroEPmFp/+xUu12J36RWKBwsPC7k0RTbxo1+8otHRIw5eJYMpsoO/ HG+ztb4CqV67+AL7MvgbQBTDVKc9XqrVl9lok9FMaAu8oJO9AyL4zDamsDUmXJCmULM3 VN1dhvrBSdQHtww61Qd8cB7EpZeETiMpwLRp6wC0/KRH3e67vWCiQOCjQc7xBrkp/snB /cSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jBlHtSGc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d10-20020a170902f14a00b0015d1f4d22b6si22552651plb.133.2022.06.07.22.35.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:35:55 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jBlHtSGc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7982519BC04; Tue, 7 Jun 2022 22:02:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350567AbiFGSGQ (ORCPT + 99 others); Tue, 7 Jun 2022 14:06:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348646AbiFGRpx (ORCPT ); Tue, 7 Jun 2022 13:45:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 789F8132A01; Tue, 7 Jun 2022 10:35:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 00D4561480; Tue, 7 Jun 2022 17:35:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D1A8C385A5; Tue, 7 Jun 2022 17:35:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654623338; bh=kkLcL0lXyNtpQEf5iq89zh3G3KGZ6xoM63TcfS0HYPU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jBlHtSGcPic5qwxRZnQV8tGFmyZ+XFkc6rPrTSf6LmkFGaW2uNf9N/k3e708g1E4c EJaKUlouggzYZZmNfh4ozbDuM3cTRt8S9lGZTasOVnSHIFB9nrg5GUQkR8o0q1Jyx7 tVRA/5uK6prVkAtiQto5YrgcNi4uIfhCSF0gDv4U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , Anna Schumaker , Sasha Levin Subject: [PATCH 5.10 331/452] NFS: Dont report errors from nfs_pageio_complete() more than once Date: Tue, 7 Jun 2022 19:03:08 +0200 Message-Id: <20220607164918.423002293@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Trond Myklebust [ Upstream commit c5e483b77cc2edb318da152abe07e33006b975fd ] Since errors from nfs_pageio_complete() are already being reported through nfs_async_write_error(), we should not be returning them to the callers of do_writepages() as well. They will end up being reported through the generic mechanism instead. Fixes: 6fbda89b257f ("NFS: Replace custom error reporting mechanism with generic one") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- fs/nfs/write.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index b08323ed0c25..dc08a0c02f09 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -675,11 +675,7 @@ static int nfs_writepage_locked(struct page *page, err = nfs_do_writepage(page, wbc, &pgio); pgio.pg_error = 0; nfs_pageio_complete(&pgio); - if (err < 0) - return err; - if (nfs_error_is_fatal(pgio.pg_error)) - return pgio.pg_error; - return 0; + return err; } int nfs_writepage(struct page *page, struct writeback_control *wbc) @@ -730,9 +726,6 @@ int nfs_writepages(struct address_space *mapping, struct writeback_control *wbc) if (err < 0) goto out_err; - err = pgio.pg_error; - if (nfs_error_is_fatal(err)) - goto out_err; return 0; out_err: return err; -- 2.35.1