Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ceph: Fix race between hole punch and page fault
Ceph has a following race between hole punching and page fault: CPU1 CPU2 ceph_fallocate() ... ceph_zero_pagecache_range() ceph_filemap_fault() faults in page in the range being punched ceph_zero_objects() And now we have a page in punched range with invalid data. Fix the problem by using mapping->invalidate_lock similarly to other filesystems. Note that using invalidate_lock also fixes a similar race wrt ->readpage(). CC: Jeff Layton <[email protected]> CC: [email protected] Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Jan Kara <[email protected]>
- Loading branch information