diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 1cb345e7c181..6f5cb63bed17 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c | |||
@@ -1392,14 +1392,14 @@ xfs_zero_file_space( | |||
1392 | 1392 | ||
1393 | if (start_boundary < end_boundary - 1) { | 1393 | if (start_boundary < end_boundary - 1) { |
1394 | /* | 1394 | /* |
1395 | * punch out delayed allocation blocks and the page cache over | 1395 | * Writeback the range to ensure any inode size updates due to |
1396 | * the conversion range | 1396 | * appending writes make it to disk (otherwise we could just |
1397 | * punch out the delalloc blocks). | ||
1397 | */ | 1398 | */ |
1398 | xfs_ilock(ip, XFS_ILOCK_EXCL); | 1399 | error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, |
1399 | error = xfs_bmap_punch_delalloc_range(ip, | 1400 | start_boundary, end_boundary - 1); |
1400 | XFS_B_TO_FSBT(mp, start_boundary), | 1401 | if (error) |
1401 | XFS_B_TO_FSB(mp, end_boundary - start_boundary)); | 1402 | goto out; |
1402 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | ||
1403 | truncate_pagecache_range(VFS_I(ip), start_boundary, | 1403 | truncate_pagecache_range(VFS_I(ip), start_boundary, |
1404 | end_boundary - 1); | 1404 | end_boundary - 1); |
1405 | 1405 | ||