Commit 36a9346c authored by Trond Myklebust's avatar Trond Myklebust

NFS: Don't set NFS_INO_REVAL_PAGECACHE in the inode cache validity

It is no longer necessary to preserve the NFS_INO_REVAL_PAGECACHE flag.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 13c0b082
...@@ -202,11 +202,12 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags) ...@@ -202,11 +202,12 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
flags &= ~NFS_INO_INVALID_OTHER; flags &= ~NFS_INO_INVALID_OTHER;
flags &= ~(NFS_INO_INVALID_CHANGE flags &= ~(NFS_INO_INVALID_CHANGE
| NFS_INO_INVALID_SIZE | NFS_INO_INVALID_SIZE
| NFS_INO_REVAL_PAGECACHE
| NFS_INO_INVALID_XATTR); | NFS_INO_INVALID_XATTR);
} else if (flags & NFS_INO_REVAL_PAGECACHE) } else if (flags & NFS_INO_REVAL_PAGECACHE)
flags |= NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_SIZE; flags |= NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_SIZE;
flags &= ~NFS_INO_REVAL_PAGECACHE;
if (!nfs_has_xattr_cache(nfsi)) if (!nfs_has_xattr_cache(nfsi))
flags &= ~NFS_INO_INVALID_XATTR; flags &= ~NFS_INO_INVALID_XATTR;
if (flags & NFS_INO_INVALID_DATA) if (flags & NFS_INO_INVALID_DATA)
...@@ -1917,7 +1918,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) ...@@ -1917,7 +1918,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR
| NFS_INO_INVALID_ATIME | NFS_INO_INVALID_ATIME
| NFS_INO_REVAL_FORCED | NFS_INO_REVAL_FORCED
| NFS_INO_REVAL_PAGECACHE
| NFS_INO_INVALID_BLOCKS); | NFS_INO_INVALID_BLOCKS);
/* Do atomic weak cache consistency updates */ /* Do atomic weak cache consistency updates */
...@@ -1956,7 +1956,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) ...@@ -1956,7 +1956,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
} else { } else {
nfsi->cache_validity |= save_cache_validity & nfsi->cache_validity |= save_cache_validity &
(NFS_INO_INVALID_CHANGE (NFS_INO_INVALID_CHANGE
| NFS_INO_REVAL_PAGECACHE
| NFS_INO_REVAL_FORCED); | NFS_INO_REVAL_FORCED);
cache_revalidated = false; cache_revalidated = false;
} }
...@@ -2008,7 +2007,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) ...@@ -2008,7 +2007,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
} else { } else {
nfsi->cache_validity |= save_cache_validity & nfsi->cache_validity |= save_cache_validity &
(NFS_INO_INVALID_SIZE (NFS_INO_INVALID_SIZE
| NFS_INO_REVAL_PAGECACHE
| NFS_INO_REVAL_FORCED); | NFS_INO_REVAL_FORCED);
cache_revalidated = false; cache_revalidated = false;
} }
......
...@@ -1191,7 +1191,6 @@ nfs4_update_changeattr_locked(struct inode *inode, ...@@ -1191,7 +1191,6 @@ nfs4_update_changeattr_locked(struct inode *inode,
cache_validity |= NFS_INO_INVALID_CTIME | NFS_INO_INVALID_MTIME; cache_validity |= NFS_INO_INVALID_CTIME | NFS_INO_INVALID_MTIME;
if (cinfo->atomic && cinfo->before == inode_peek_iversion_raw(inode)) { if (cinfo->atomic && cinfo->before == inode_peek_iversion_raw(inode)) {
nfsi->cache_validity &= ~NFS_INO_REVAL_PAGECACHE;
nfsi->attrtimeo_timestamp = jiffies; nfsi->attrtimeo_timestamp = jiffies;
} else { } else {
if (S_ISDIR(inode->i_mode)) { if (S_ISDIR(inode->i_mode)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment