NFS: Replace last uses of NFS_INO_REVAL_PAGECACHE
Now that we have more fine grained attribute revalidation, let's just get rid of NFS_INO_REVAL_PAGECACHE. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
Родитель
50c790a0b6
Коммит
88a6099fc3
|
@ -236,19 +236,17 @@ static void nfs_zap_caches_locked(struct inode *inode)
|
||||||
nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
|
nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
|
||||||
nfsi->attrtimeo_timestamp = jiffies;
|
nfsi->attrtimeo_timestamp = jiffies;
|
||||||
|
|
||||||
if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)) {
|
if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))
|
||||||
nfs_set_cache_invalid(inode, NFS_INO_INVALID_ATTR
|
nfs_set_cache_invalid(inode, NFS_INO_INVALID_ATTR |
|
||||||
| NFS_INO_INVALID_DATA
|
NFS_INO_INVALID_DATA |
|
||||||
| NFS_INO_INVALID_ACCESS
|
NFS_INO_INVALID_ACCESS |
|
||||||
| NFS_INO_INVALID_ACL
|
NFS_INO_INVALID_ACL |
|
||||||
| NFS_INO_INVALID_XATTR
|
NFS_INO_INVALID_XATTR);
|
||||||
| NFS_INO_REVAL_PAGECACHE);
|
else
|
||||||
} else
|
nfs_set_cache_invalid(inode, NFS_INO_INVALID_ATTR |
|
||||||
nfs_set_cache_invalid(inode, NFS_INO_INVALID_ATTR
|
NFS_INO_INVALID_ACCESS |
|
||||||
| NFS_INO_INVALID_ACCESS
|
NFS_INO_INVALID_ACL |
|
||||||
| NFS_INO_INVALID_ACL
|
NFS_INO_INVALID_XATTR);
|
||||||
| NFS_INO_INVALID_XATTR
|
|
||||||
| NFS_INO_REVAL_PAGECACHE);
|
|
||||||
nfs_zap_label_cache_locked(nfsi);
|
nfs_zap_label_cache_locked(nfsi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -306,7 +306,7 @@ static void nfs_set_pageerror(struct address_space *mapping)
|
||||||
/* Force file size revalidation */
|
/* Force file size revalidation */
|
||||||
spin_lock(&inode->i_lock);
|
spin_lock(&inode->i_lock);
|
||||||
nfs_set_cache_invalid(inode, NFS_INO_REVAL_FORCED |
|
nfs_set_cache_invalid(inode, NFS_INO_REVAL_FORCED |
|
||||||
NFS_INO_REVAL_PAGECACHE |
|
NFS_INO_INVALID_CHANGE |
|
||||||
NFS_INO_INVALID_SIZE);
|
NFS_INO_INVALID_SIZE);
|
||||||
spin_unlock(&inode->i_lock);
|
spin_unlock(&inode->i_lock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -356,11 +356,9 @@ static inline void nfs_mark_for_revalidate(struct inode *inode)
|
||||||
struct nfs_inode *nfsi = NFS_I(inode);
|
struct nfs_inode *nfsi = NFS_I(inode);
|
||||||
|
|
||||||
spin_lock(&inode->i_lock);
|
spin_lock(&inode->i_lock);
|
||||||
nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE
|
nfsi->cache_validity |= NFS_INO_INVALID_ACCESS | NFS_INO_INVALID_ACL |
|
||||||
| NFS_INO_INVALID_ACCESS
|
NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_CTIME |
|
||||||
| NFS_INO_INVALID_ACL
|
NFS_INO_INVALID_SIZE;
|
||||||
| NFS_INO_INVALID_CHANGE
|
|
||||||
| NFS_INO_INVALID_CTIME;
|
|
||||||
if (S_ISDIR(inode->i_mode))
|
if (S_ISDIR(inode->i_mode))
|
||||||
nfsi->cache_validity |= NFS_INO_INVALID_DATA;
|
nfsi->cache_validity |= NFS_INO_INVALID_DATA;
|
||||||
spin_unlock(&inode->i_lock);
|
spin_unlock(&inode->i_lock);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче