Skip to content

Commit

Permalink
ceph: fix fscache invalidation
Browse files Browse the repository at this point in the history
Ensure that we invalidate the fscache whenever we invalidate the
pagecache.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Cc: ceph-devel@vger.kernel.org
Cc: linux-cachefs@redhat.com
Cc: linux-fsdevel@vger.kernel.org
  • Loading branch information
jtlayton authored and intel-lab-lkp committed Feb 23, 2021
1 parent 7f2fdaa commit 21dca27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1867,6 +1867,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);

Expand Down
1 change: 1 addition & 0 deletions fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,7 @@ static void ceph_do_invalidate_pages(struct inode *inode)
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);
}
Expand Down

0 comments on commit 21dca27

Please sign in to comment.