From: Trond Myklebust Date: Fri, 26 Mar 2021 00:46:36 +0000 (-0400) Subject: NFS: NFS_INO_REVAL_PAGECACHE should mark the change attribute invalid X-Git-Tag: v5.10.79~4323 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d35891cbb1d4af48393ae2c6a45c6530d798c64c;p=platform%2Fkernel%2Flinux-rpi.git NFS: NFS_INO_REVAL_PAGECACHE should mark the change attribute invalid [ 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 --- diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 6e2e948..dc2cbca 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -207,7 +207,8 @@ static 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 (inode->i_mapping->nrpages == 0) flags &= ~(NFS_INO_INVALID_DATA|NFS_INO_DATA_INVAL_DEFER);