Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2194745iof; Tue, 7 Jun 2022 22:50:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypKrlmnO7w7o41FIK2W7Me5bF7RLyr/GRop+e8ns6S4hn4GyqebyUEm+l0pejZ7Sw8dAeJ X-Received: by 2002:a63:69c2:0:b0:3fa:78b5:d991 with SMTP id e185-20020a6369c2000000b003fa78b5d991mr29294572pgc.40.1654667406170; Tue, 07 Jun 2022 22:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667406; cv=none; d=google.com; s=arc-20160816; b=tS+hUkdSWDXBdJvbUF9PkT9lu5hg/YNynsEtqYtndyRysIz3lbqtjvfy52PBzG7g85 Q4gJBzvrltn3mMvM+bz9xbd66W8VESEZdUNn8a/2cw+Fy0NQH8yTzth5uBChu9XllABQ +J8+QI4t1O9K2lj2AhFWSWPso3cRMEw0zlIOrs9h6ixLvZQH2/TDC7B7LjiMgp/D1hvs d9wbN2xn/+N2Yg+D1UZ5EkakviRaogcASLjoj/mrx/qs1VTJyDebjvu8I6TmzZTa2ISM /IHJMyo/DhCmjy457T1pcwhk3BSPxUGED70Ae9fSn1OD4MTt2FEyEX9lD1hM2ypX5CYB qfPQ== 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=Lk++yvuLkDT6u/PCmeKT75SBdB08R3c30leWq2ljrVo=; b=tMfzKKSJuGVZkTT+RLwmqAwTfQk73byC2+5H3huNCr9AxlL+6w71Efw2Hj7NAJTStI 7ufRisOX4avMcnHYRorjC70jYKsjirk4qXKTAFUuEgw/LP02LMQ/mJJSDQUj+CbUEus9 2KhIoEB2oZ9+k2S+pzJUhgn/DsYkkzFlwGbYDuVH5W5OT8Fnxlp4v7WZXSBLEbk1Cksr GDm9MJ2jCQdDO0POBPF/S/4qnrcYgJl/5MxOaxzXhOoAma9vwq5yKqmIC4wtwdTmQhLz z2Gk/ywy0mOoleng4upwE9JdIpQAekpaXEXxz1VMyPTcNoZGJDRj7j3MzpQAQht/nyho fr4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BLG3xYgt; 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 i1-20020a170902cf0100b0016793c0e3dcsi5170524plg.545.2022.06.07.22.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:50:06 -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=BLG3xYgt; 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 B65873C7822; Tue, 7 Jun 2022 22:17:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1389809AbiFHAgL (ORCPT + 99 others); Tue, 7 Jun 2022 20:36:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383424AbiFGWHV (ORCPT ); Tue, 7 Jun 2022 18:07:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E0A325697D; Tue, 7 Jun 2022 12:18:42 -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 32BF561935; Tue, 7 Jun 2022 19:18:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38A8CC385A2; Tue, 7 Jun 2022 19:18:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629521; bh=fiZh7oPlzA9BfrNvHEJe3e3QJVkk8r/GF6fUEAlT2jg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BLG3xYgtnhZcOEsFkLJ0MxsZErFNTvR2YWQOkPgt0SKksVZGYdBic/OFChF0sUzQJ WpeWUPj+yZ93Y7NqhjdJC4WQfls6fJefTuy+yoBpQTghLhMZ6NGm75v5xrWYdTT8AT 2TJsfbhAsgWCNw4nMdhOYqjGqfoxIZqv26e1E/vk= 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.18 680/879] NFS: Dont report errors from nfs_pageio_complete() more than once Date: Tue, 7 Jun 2022 19:03:18 +0200 Message-Id: <20220607165022.585729914@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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 e437db1791ba..4925d11849cd 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -681,11 +681,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) @@ -747,9 +743,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