Merge tag 'ceph-for-5.15-rc1' of git://github.com/ceph/ceph-client
[linux-2.6-microblaze.git] / fs / ceph / file.c
index 3daebfa..d16fd2d 100644 (file)
@@ -2090,6 +2090,7 @@ static long ceph_fallocate(struct file *file, int mode,
        if (ret < 0)
                goto unlock;
 
+       filemap_invalidate_lock(inode->i_mapping);
        ceph_zero_pagecache_range(inode, offset, length);
        ret = ceph_zero_objects(inode, offset, length);
 
@@ -2102,6 +2103,7 @@ static long ceph_fallocate(struct file *file, int mode,
                if (dirty)
                        __mark_inode_dirty(inode, dirty);
        }
+       filemap_invalidate_unlock(inode->i_mapping);
 
        ceph_put_cap_refs(ci, got);
 unlock: