]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFS: Don't set NFS_INO_REVAL_PAGECACHE in the inode cache validity
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 15 Aug 2025 20:47:28 +0000 (16:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:22:55 +0000 (16:22 +0200)
[ Upstream commit 36a9346c225270262d9f34e66c91aa1723fa903f ]

It is no longer necessary to preserve the NFS_INO_REVAL_PAGECACHE flag.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Stable-dep-of: b01f21cacde9 ("NFS: Fix the setting of capabilities when automounting a new filesystem")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/inode.c
fs/nfs/nfs4proc.c

index 3e3114a9d193759e988ce3bb385b3e778ffc1131..da8d727eb09dd9e3ee3ef56cd1d472a9e736a9d2 100644 (file)
@@ -217,11 +217,12 @@ static void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
                        flags &= ~NFS_INO_INVALID_OTHER;
                flags &= ~(NFS_INO_INVALID_CHANGE
                                | 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;
 
+       flags &= ~NFS_INO_REVAL_PAGECACHE;
+
        if (!nfs_has_xattr_cache(nfsi))
                flags &= ~NFS_INO_INVALID_XATTR;
        if (inode->i_mapping->nrpages == 0)
@@ -1900,7 +1901,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
        nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR
                        | NFS_INO_INVALID_ATIME
                        | NFS_INO_REVAL_FORCED
-                       | NFS_INO_REVAL_PAGECACHE
                        | NFS_INO_INVALID_BLOCKS);
 
        /* Do atomic weak cache consistency updates */
@@ -1942,7 +1942,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
        } else {
                nfsi->cache_validity |= save_cache_validity &
                                (NFS_INO_INVALID_CHANGE
-                               | NFS_INO_REVAL_PAGECACHE
                                | NFS_INO_REVAL_FORCED);
                cache_revalidated = false;
        }
@@ -1988,7 +1987,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
        } else {
                nfsi->cache_validity |= save_cache_validity &
                                (NFS_INO_INVALID_SIZE
-                               | NFS_INO_REVAL_PAGECACHE
                                | NFS_INO_REVAL_FORCED);
                cache_revalidated = false;
        }
index 97b5ff9c5c3ea3f4e47c6eb6d2b3b6fb87cf066a..6950cbd038f1c3c32f2218707905e30cf5dd32b0 100644 (file)
@@ -1213,7 +1213,6 @@ nfs4_update_changeattr_locked(struct inode *inode,
                | cache_validity;
 
        if (cinfo->atomic && cinfo->before == inode_peek_iversion_raw(inode)) {
-               nfsi->cache_validity &= ~NFS_INO_REVAL_PAGECACHE;
                nfsi->attrtimeo_timestamp = jiffies;
        } else {
                if (S_ISDIR(inode->i_mode)) {