Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b96a0c8 authored by Jeff Layton's avatar Jeff Layton Committed by Greg Kroah-Hartman
Browse files

ceph: fix fscache invalidation



[ Upstream commit 10a7052c7868bc7bc72d947f5aac6f768928db87 ]

Ensure that we invalidate the fscache whenever we invalidate the
pagecache.

Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a7e4dffc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1779,6 +1779,7 @@ static int try_nonblocking_invalidate(struct inode *inode)
	u32 invalidating_gen = ci->i_rdcache_gen;

	spin_unlock(&ci->i_ceph_lock);
	ceph_fscache_invalidate(inode);
	invalidate_mapping_pages(&inode->i_data, 0, -1);
	spin_lock(&ci->i_ceph_lock);

+1 −0
Original line number Diff line number Diff line
@@ -1823,6 +1823,7 @@ static void ceph_invalidate_work(struct work_struct *work)
	orig_gen = ci->i_rdcache_gen;
	spin_unlock(&ci->i_ceph_lock);

	ceph_fscache_invalidate(inode);
	if (invalidate_inode_pages2(inode->i_mapping) < 0) {
		pr_err("invalidate_pages %p fails\n", inode);
	}