NFS: nfs_mark_for_revalidate should always set NFS_INO_REVAL_PAGECACHE

I'm not aware of any existing bugs around this, but the expectation is
that nfs_mark_for_revalidate() should always force a revalidation of
the cached metadata.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
Trond Myklebust 2015-07-05 12:36:34 -04:00
Родитель cd81259979
Коммит 115c48d7a5
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -292,9 +292,12 @@ 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_INVALID_ATTR|NFS_INO_INVALID_ACCESS; nfsi->cache_validity |= NFS_INO_INVALID_ATTR |
NFS_INO_REVAL_PAGECACHE |
NFS_INO_INVALID_ACCESS |
NFS_INO_INVALID_ACL;
if (S_ISDIR(inode->i_mode)) if (S_ISDIR(inode->i_mode))
nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA; nfsi->cache_validity |= NFS_INO_INVALID_DATA;
spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock);
} }