Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1391058iob; Sat, 14 May 2022 07:48:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIbYJVmYk2f7aKyfc5aamCUjPi5JctISPhODrxEhPIUCzpHBLwaAfcoAspEprzjlnvWJwE X-Received: by 2002:a05:6402:4410:b0:427:ab6f:a39a with SMTP id y16-20020a056402441000b00427ab6fa39amr4046341eda.120.1652539715228; Sat, 14 May 2022 07:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652539715; cv=none; d=google.com; s=arc-20160816; b=J7w20XaBuA+XfU/Yu7EWz4Pr0eHAP6XRHTjC9hgagxdS0DA/+tObhqbg/FC+aBYRWH ywJMaeoaHBSukKgnB9oGfC14RwfVLdwxs/ICA+52O3MGZmPGKAQ3e0e7uSfv+/94wzPj hLv5A4rvutX1/aSGtmjrwgK4x/7phqP74EuO4eQs/QzlypwTqUWBueO1YoPlYtny0nqm zigL1d3ozLAGdv7aQBHm+XxaXdJkaiBwj2H4bekApvpNiLExsKziOz6rvOncsLKswgfg GXMvsAOPRSVwepYk9swtxUKqT+rAeK7rw0UrOd6vvLfJSgpRG8Je9HiF0W35qy4lux1g n8rA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0Cjh9QDU78F9MP9q5ZVWfzQ4yRyv1pOBNo51cJ1IQzI=; b=H+ZZDLJ3cN9jJLzj8KQQ5tej481+/NAAJ5ttwnPTG8m/k2OGnzBhC5ga3hPURvenOB 7b9Nl9FERIeDihbfabLmZUWj8TqgdGnIK/dIf1u7JFmrn/gpERiStBLJrLyjRuoa24id lho5fCdhCmYgK8dpRBy4p4P09Ww2yEx8UdxO+AF9WA147FqiGMwg3uWJ34qKykLdZ0cX /s/jpyE2NiyebSpZ7bjq6WaNVsWm7i2HpyOf0usb24o/WpjU3UeLIQ3UeVQBqsAJ/FT2 YgeDR2REfixwTzFwtx/lnvnMPogtTqnYke1Kj1ZRwgdO5FN5RclmJCeUp9YWFdCONUAk LcLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Njjq1zSb; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a056402440c00b0041d70951197si5140537eda.530.2022.05.14.07.47.58; Sat, 14 May 2022 07:48:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Njjq1zSb; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232498AbiENOdT (ORCPT + 99 others); Sat, 14 May 2022 10:33:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233339AbiENOdQ (ORCPT ); Sat, 14 May 2022 10:33:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBE371CFCB for ; Sat, 14 May 2022 07:33:15 -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 ams.source.kernel.org (Postfix) with ESMTPS id 17EEFB80907 for ; Sat, 14 May 2022 14:33:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 712D2C34115; Sat, 14 May 2022 14:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652538793; bh=2uypRLy68/oN/fKavebGwOtAoHFFpgu9SH9UJYQ3NR8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Njjq1zSbS3PwpRFT1MNAHT90BB7ps+4HLakzK1dF1hefyb9YE9FH6PgyQHe6XjqwX /TsdoZSBrfzgHZm5kLFF9DkJS7frP4Al6Rh1z3n0bwsxtNB44OwkKxhqQ399cU4ySp yFASVeeN/tSeB4ukCe6hF8/mPDPXAjqNS/YUQ47lb7aouzuXifgBLrxHj5qqId5PF4 gjDV3ZPpjG1rT5xRxHax1+bmEO+Dn4Fbnr98GlTkTRpYICe/SLOdjyqhh2HPTJ7BSu BYrrGjtbRcAJ0efOKSZdKJrpmv3ulHF9uMu9S+p8MBWWqdKj6mkoLJ9jh/HOWphztz e8jRoR9ugiIbQ== From: trondmy@kernel.org To: Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH v3 5/5] NFS: Don't report errors from nfs_pageio_complete() more than once Date: Sat, 14 May 2022 10:27:04 -0400 Message-Id: <20220514142704.4149-6-trondmy@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220514142704.4149-5-trondmy@kernel.org> References: <20220514142704.4149-1-trondmy@kernel.org> <20220514142704.4149-2-trondmy@kernel.org> <20220514142704.4149-3-trondmy@kernel.org> <20220514142704.4149-4-trondmy@kernel.org> <20220514142704.4149-5-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-nfs@vger.kernel.org From: Trond Myklebust 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 --- 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 ce4cc4222422..2f41659e232e 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) @@ -744,9 +740,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.36.1