Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp567298pxb; Tue, 15 Feb 2022 22:19:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyh/zqGlG7OKI1OXSRsJ4v7FGx4oZ11IBjY4khRWVgMjtChvCj4hgyPYISQ/xNbe+b6+tYM X-Received: by 2002:a17:902:a406:b0:14d:61ba:8bcc with SMTP id p6-20020a170902a40600b0014d61ba8bccmr1203639plq.36.1644992349664; Tue, 15 Feb 2022 22:19:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644992349; cv=none; d=google.com; s=arc-20160816; b=JH6tibOCakT1q5mHW99Hgz9pYTuaMtU+0L8PaXPZxAGSWteoNyWX3vsaxYPlq1yRUX 0Xuqc1faCaO9MjMnUMI54Tc3g5iA+HSjG0Hd2bhCZXY0ubj5JC/b+49SOSOGrpXIwG67 j13jMcglOhQKE+JDxqPqsRp3KgZDmAFi6KkkBFbFoxDYk3pQVbZ9cNuNR3xNZQjv6FVS rD+gqIMPZRMQB6aTTcc7ngQslB5s0snR+PPZG2VFGDqwz9EAIRt+Jtq4w8l6nNACJ9g6 puf07iXY/Li0K7l/mfB7+Zao573PbJKdLVam7aSVo1hUVLGwgP1oM/3zD9cQFU5Q9fFp Jj4g== 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:to:from :dkim-signature; bh=auRg+gxGk3NXzgJ2RQaxLaOZ6agfwJsjzOPr9CCgrro=; b=qveFo16Eko3zwrUTYHMIotbhTccMChiwU67qxLuqDs6w6iy4ABjayHfcVwYBdq1Jkr w3xHwL8artqE6iqLToBdEWUOoctSn7Etk6Y9pzx2jdGJu98plc91xKON3aDTuhHJTOnV tr6ujzVigVNTG7loK7eIZLsJLa80h/7tZ77R5NSkMgyaiNbQuTZ93susjKoxmv3MYQwm 3mpEcbFhkpHRdUvwyJWknKeSuOlpwlgLEQUROGGh2Dha1lwSjhCzqdVDwsNNfpL959bg i5PtMOGQsa8L3q3pA6gDcqN+y6DNm9ILWyl83MkAL2dp3aQlZhwp1mC+Wq8VYAIbJLQ+ YIHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lrOcH27E; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m22si3517685pjr.168.2022.02.15.22.19.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:19:09 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-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=@kernel.org header.s=k20201202 header.b=lrOcH27E; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C7D40E3B; Tue, 15 Feb 2022 22:16:44 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229729AbiBOXL6 (ORCPT + 99 others); Tue, 15 Feb 2022 18:11:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238786AbiBOXL5 (ORCPT ); Tue, 15 Feb 2022 18:11:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC2D013CF6 for ; Tue, 15 Feb 2022 15:11:46 -0800 (PST) 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 6641161502 for ; Tue, 15 Feb 2022 23:11:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AA7FC340F0 for ; Tue, 15 Feb 2022 23:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644966705; bh=UCn/QnjNhOcTDfq8uqDXDR/GNHqDfhklFjWfMyBMeV8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lrOcH27EOdlPgor7/m8dqXGmS2FbjDbdQAUL4RLGDwS4hSDBtiMsz2DES0+lFhaz+ s/WEA105TMeFjIyhbA2vFtiNkFV9lMCIqjigyb4iNHcNecgH9q9fchLo+mx52EY8ZU 2TPL3bHHSY0pBA7YvEl7mny0CmJm05HiZd05Ro6ZfykT7nMfopiabVxxRjNPM6BbTO CWViNlX/EhXNsWp6wVBGbCxyY0QXpkzLyPKboJy8XAdp7dxx4ZYvE7/WjsFqFP3jye UDO4KvVisrEareG4bOKyhYj3huKFdAne7KXiadStYBBIl6Z6kCfeyjwrQmCQcCv5t2 rZoCX6ezrtSdg== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 2/2] NFS: Do not report writeback errors in nfs_getattr() Date: Tue, 15 Feb 2022 18:05:18 -0500 Message-Id: <20220215230518.24923-2-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220215230518.24923-1-trondmy@kernel.org> References: <20220215230518.24923-1-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-nfs@vger.kernel.org From: Trond Myklebust The result of the writeback, whether it is an ENOSPC or an EIO, or anything else, does not inhibit the NFS client from reporting the correct file timestamps. Fixes: 79566ef018f5 ("NFS: Getattr doesn't require data sync semantics") Signed-off-by: Trond Myklebust --- fs/nfs/inode.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 90432fc389a0..f9fc506ebb29 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -850,12 +850,9 @@ int nfs_getattr(struct user_namespace *mnt_userns, const struct path *path, } /* Flush out writes to the server in order to update c/mtime. */ - if ((request_mask & (STATX_CTIME|STATX_MTIME)) && - S_ISREG(inode->i_mode)) { - err = filemap_write_and_wait(inode->i_mapping); - if (err) - goto out; - } + if ((request_mask & (STATX_CTIME | STATX_MTIME)) && + S_ISREG(inode->i_mode)) + filemap_write_and_wait(inode->i_mapping); /* * We may force a getattr if the user cares about atime. -- 2.35.1