NFS: Don't force a revalidation of all attributes if change is missing
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 20 Mar 2018 20:53:28 +0000 (16:53 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 10 Apr 2018 20:06:22 +0000 (16:06 -0400)
Even if the change attribute is missing, it is still OK to mark the other
attributes as being up to date.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/inode.c

index 9da00b2..5a721c3 100644 (file)
@@ -1813,7 +1813,10 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
                        inode_set_iversion_raw(inode, fattr->change_attr);
                }
        } else {
-               nfsi->cache_validity |= save_cache_validity;
+               nfsi->cache_validity |= save_cache_validity &
+                               (NFS_INO_INVALID_ATTR
+                               | NFS_INO_REVAL_PAGECACHE
+                               | NFS_INO_REVAL_FORCED);
                cache_revalidated = false;
        }