Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3974144pxf; Mon, 29 Mar 2021 17:21:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXgxiNsToMO0m+jJRo6M7BqXUnDCIYB21bZdbIZQEyayCrdc+SkUxWv245QTTWWPCVxqyl X-Received: by 2002:a05:6402:1051:: with SMTP id e17mr31049457edu.42.1617063666637; Mon, 29 Mar 2021 17:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617063666; cv=none; d=google.com; s=arc-20160816; b=0+XtJMeHBbj+15nFGQukngcPR0hT8DmfWKufmiNTuA/e+5b5GoLn+hrmIPvWFkyz5z MaI3/U8hytarj09dNXdO8aKSPwpj44VBaolVpmcoaKk5ZCo6cdzaLBuRZL8zcUrmF3da 0HhuAgyMvsnYoOfqa36cO1E4smQjDUkOBuIx3xR9+aMr3kKuQR5kbtEh/WVapRB526LN 6On5uGYYzHGT5OQSZDDWmRIRI79hpKNbiwZObp193zzbjjqF1xaRFQ9qzn/VbknF/Tnf drDbtqa43y8Z0C8ayQ5Cyi2M6VaavVdpsdK8lmk5awMd4qW399JZGRSafm4j4ds0EMit 29XQ== 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=AlGAi/EYUEwsFAvYjGueatCycGJOl7F/Ee1G7s8FavM=; b=CD2ghGRtnF1SJoDGzqdAmoCoXpVoYbBvFI+IwViC6Q7ChJp6kxRd8CwgD33Bv57Kc1 YhsuTzovLpCCgHrzcIDPA5c20umrHvJ7UGMvEGXzJuOJHBJEbg8QLZtkyOfDdOBnR5QC jAW0H8Neob8nQCxfw3oGlPDyKnW9RjpAGQXT9Z6YZWvvf76ubittqx0eRvoP2LM/irP7 Dh0xSbmolLLQRZXG+Hv1ZrWI6hLi0vNIYLTXIntV73WlYVi3DZ7slpcPbPm4Yz/3cq29 Fry60c+KdgUTVpCyT5b+V7DVjw9OcT4DK4n5+5syJzAVSPJgMsqYz5QJ1aMc2kX5EJ+P A+FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FQA5jp98; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si14873861ejb.114.2021.03.29.17.20.44; Mon, 29 Mar 2021 17:21:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FQA5jp98; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 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 S230212AbhC3ATP (ORCPT + 99 others); Mon, 29 Mar 2021 20:19:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:50396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230209AbhC3ASp (ORCPT ); Mon, 29 Mar 2021 20:18:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F2E460295 for ; Tue, 30 Mar 2021 00:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617063525; bh=vVssDi5vxdg/ckVG4mCug4s3T504yxY8NzjKMtj1ElA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FQA5jp98TsaWXcgBt+QKXLjahJu7MEDgI+1uZD9CyO5nLIXrxfENjZpBnRphvRSGV GNnTJctwU/11Sxp8yU6Q9+x40QFC5V1vnLmx1EPyKZuaJY7HlOJjsvvWf01XrnxWtc IbYSC9tFOwGXZhshsga4JDTBkEWNzhXlEzN8hKx4Mdx+5FP6kLMiaE5HpeuhhY55Q/ GjtDah1kCy9sjWlhS3+ya0grRwFtVFnBfyGewrC84ZMZZ85DNssiVtbCLkvJCkvKRr yVVpzVFx4w89c0lRn/jM7nAaDVUWEK7u+UR3SF1OX+XI5rEqpBnwR1sXgQvNxnCOT0 D22WGD6hFg7sA== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 12/17] NFS: Fix up handling of outstanding layoutcommit in nfs_update_inode() Date: Mon, 29 Mar 2021 20:18:30 -0400 Message-Id: <20210330001835.41914-13-trondmy@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210330001835.41914-12-trondmy@kernel.org> References: <20210330001835.41914-1-trondmy@kernel.org> <20210330001835.41914-2-trondmy@kernel.org> <20210330001835.41914-3-trondmy@kernel.org> <20210330001835.41914-4-trondmy@kernel.org> <20210330001835.41914-5-trondmy@kernel.org> <20210330001835.41914-6-trondmy@kernel.org> <20210330001835.41914-7-trondmy@kernel.org> <20210330001835.41914-8-trondmy@kernel.org> <20210330001835.41914-9-trondmy@kernel.org> <20210330001835.41914-10-trondmy@kernel.org> <20210330001835.41914-11-trondmy@kernel.org> <20210330001835.41914-12-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust If there is an outstanding layoutcommit, then the list of attributes whose values are expected to change is not the full set. So let's be explicit about the full list. Signed-off-by: Trond Myklebust --- fs/nfs/inode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index c9386981d210..e57cd490bc4d 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1939,7 +1939,11 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) nfs_wcc_update_inode(inode, fattr); if (pnfs_layoutcommit_outstanding(inode)) { - nfsi->cache_validity |= save_cache_validity & NFS_INO_INVALID_ATTR; + nfsi->cache_validity |= + save_cache_validity & + (NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_CTIME | + NFS_INO_INVALID_MTIME | NFS_INO_INVALID_SIZE | + NFS_INO_REVAL_FORCED); cache_revalidated = false; } -- 2.30.2