aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/extents.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 82df3ce9874a..be1e56cbbf32 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -5383,6 +5383,13 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
5383 punch_start = offset >> EXT4_BLOCK_SIZE_BITS(sb); 5383 punch_start = offset >> EXT4_BLOCK_SIZE_BITS(sb);
5384 punch_stop = (offset + len) >> EXT4_BLOCK_SIZE_BITS(sb); 5384 punch_stop = (offset + len) >> EXT4_BLOCK_SIZE_BITS(sb);
5385 5385
5386 /* Call ext4_force_commit to flush all data in case of data=journal. */
5387 if (ext4_should_journal_data(inode)) {
5388 ret = ext4_force_commit(inode->i_sb);
5389 if (ret)
5390 return ret;
5391 }
5392
5386 /* Write out all dirty pages */ 5393 /* Write out all dirty pages */
5387 ret = filemap_write_and_wait_range(inode->i_mapping, offset, -1); 5394 ret = filemap_write_and_wait_range(inode->i_mapping, offset, -1);
5388 if (ret) 5395 if (ret)