Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp217432pxj; Thu, 20 May 2021 07:54:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwi4+7JTiX0Fj/7NaJ65DquBKNNUomcCbGOxPjROEQZwwXJ4MomXKPOWyBgdr+gkO8z0Ojs X-Received: by 2002:a05:6402:7d4:: with SMTP id u20mr5413527edy.302.1621522489035; Thu, 20 May 2021 07:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621522489; cv=none; d=google.com; s=arc-20160816; b=SxMLIy5BYLRYUFWSJYMbT0zSfTY3rn/IU/zshzMtSwsQEDEEnKIWxZGgJS/CwJ7ATT ESLol5sYlEO1hiLA0MLS4MXr8EhfH5/+sXHcZJzoBYJSlOoCmFkl8LRSfDWesfXFl5GX 2J1jgIYRly4WmXeJz2+2ArQA0o0Yr+cluIWKf1D6I9hoNUVTmWf6aedf4B3nX6fzpxcv w7erQPn6zocaViCNCssIvzpT0LHkb3RdtMuRsYD+Ru1MrRk0obhK9NzUGKw9oTp1nRho JaKlKPrMZhy8oC0dAY5LveRFIqhtwXp1Us6awY3CvzI36BYgM6ocXRj0nPjuZJApkcte q/og== 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=5PtTyc5QL1iZRI7PuIxVwBOb9IMJ/F7twsnGFGnnY5A=; b=C/rCZ0b1DFeDc9uJjAps1Yv/PFZHsco7oh7zZi2Dujqs5eKYxCkS4iAJsszbWJkqPQ P4v+tEQub4bWDnphIw/9ZDeMPDY2d1gj/EGTgoeoQjx9IOHCIKCvK6PBSf+PgmEWfZj0 aB8PGbFt37HD5jJ4ppephW36Luseya/i9yUJciqjyTaN2QBgjOAXZpyj8Re4ErICq44S fIqDXrQijMpJ12QtnwuaESMCkKZj9hP0EXQP6yoLCyrkQ5BXTIbh72gxq+bFZwPuG0O1 ibfYkpHB+xXgTGcb83nl2a1fi7jHqE/lZTFoT72s8rlQGtR0kU0j2rJ+MIraC0NUUkSM eqXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xxW7v94l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si2867852ejq.293.2021.05.20.07.54.24; Thu, 20 May 2021 07:54:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=xxW7v94l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231652AbhETJ0S (ORCPT + 99 others); Thu, 20 May 2021 05:26:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:52380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231575AbhETJ0K (ORCPT ); Thu, 20 May 2021 05:26:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B02786121E; Thu, 20 May 2021 09:24:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621502689; bh=B3A+n1zVtc3QtO78N4DSfLAKzHJNFypaNnHymOaCGE8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xxW7v94lY1FRDfdr3ECKoNKTsUPO8fIPLpLuKSrlv8vbFpXOkcVMu1I6rJy6Yc9ui V8bit/E5gnTMEbxawJVSGrxTFX0vwvIBTAh9X/4HVJ3tTeBwZ6SLPug65JOo1u7MOw qD4oxj2n1vF0n9f9jxFfZhLRhGuLrYbeCkwb6+OI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , Sasha Levin Subject: [PATCH 5.12 15/45] NFS: NFS_INO_REVAL_PAGECACHE should mark the change attribute invalid Date: Thu, 20 May 2021 11:22:03 +0200 Message-Id: <20210520092054.022679935@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092053.516042993@linuxfoundation.org> References: <20210520092053.516042993@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Trond Myklebust [ Upstream commit 50c7a7994dd20af56e4d47e90af10bab71b71001 ] When we're looking to revalidate the page cache, we should just ensure that we mark the change attribute invalid. Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- fs/nfs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 8de5b3b9da91..ae8bc84e39fb 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -219,7 +219,8 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags) | NFS_INO_INVALID_SIZE | NFS_INO_REVAL_PAGECACHE | NFS_INO_INVALID_XATTR); - } + } else if (flags & NFS_INO_REVAL_PAGECACHE) + flags |= NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_SIZE; if (!nfs_has_xattr_cache(nfsi)) flags &= ~NFS_INO_INVALID_XATTR; -- 2.30.2