mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
ceph: fix fscache invalidation
[ Upstream commit 10a7052c78 ]
Ensure that we invalidate the fscache whenever we invalidate the
pagecache.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f8adfb1d37
commit
2783c34d54
|
|
@ -1866,6 +1866,7 @@ static int try_nonblocking_invalidate(struct inode *inode)
|
||||||
u32 invalidating_gen = ci->i_rdcache_gen;
|
u32 invalidating_gen = ci->i_rdcache_gen;
|
||||||
|
|
||||||
spin_unlock(&ci->i_ceph_lock);
|
spin_unlock(&ci->i_ceph_lock);
|
||||||
|
ceph_fscache_invalidate(inode);
|
||||||
invalidate_mapping_pages(&inode->i_data, 0, -1);
|
invalidate_mapping_pages(&inode->i_data, 0, -1);
|
||||||
spin_lock(&ci->i_ceph_lock);
|
spin_lock(&ci->i_ceph_lock);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1912,6 +1912,7 @@ static void ceph_do_invalidate_pages(struct inode *inode)
|
||||||
orig_gen = ci->i_rdcache_gen;
|
orig_gen = ci->i_rdcache_gen;
|
||||||
spin_unlock(&ci->i_ceph_lock);
|
spin_unlock(&ci->i_ceph_lock);
|
||||||
|
|
||||||
|
ceph_fscache_invalidate(inode);
|
||||||
if (invalidate_inode_pages2(inode->i_mapping) < 0) {
|
if (invalidate_inode_pages2(inode->i_mapping) < 0) {
|
||||||
pr_err("invalidate_pages %p fails\n", inode);
|
pr_err("invalidate_pages %p fails\n", inode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user