diff options
author | Dave Chinner <david@fromorbit.com> | 2014-10-12 23:22:45 (GMT) |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-10-12 23:22:45 (GMT) |
commit | 6889e783cd68b79f8330ad4d10a2571c67c3f7df (patch) | |
tree | 6ebb3900542a9d449e9c5d9b5191f35845f40130 /fs/xfs/xfs_bmap_util.c | |
parent | 75e58ce4c8f354f1a68a8bb8a9692827cdaf3d21 (diff) | |
parent | a8b1ee8bafc765ebf029d03c5479a69aebff9693 (diff) | |
download | linux-6889e783cd68b79f8330ad4d10a2571c67c3f7df.tar.xz |
Merge branch 'xfs-misc-fixes-for-3.18-3' into for-next
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-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 c2aaa58..92e8f99 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c @@ -1368,14 +1368,14 @@ xfs_zero_file_space( if (start_boundary < end_boundary - 1) { /* - * punch out delayed allocation blocks and the page cache over - * the conversion range + * Writeback the range to ensure any inode size updates due to + * appending writes make it to disk (otherwise we could just + * punch out the delalloc blocks). */ - xfs_ilock(ip, XFS_ILOCK_EXCL); - error = xfs_bmap_punch_delalloc_range(ip, - XFS_B_TO_FSBT(mp, start_boundary), - XFS_B_TO_FSB(mp, end_boundary - start_boundary)); - xfs_iunlock(ip, XFS_ILOCK_EXCL); + error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, + start_boundary, end_boundary - 1); + if (error) + goto out; truncate_pagecache_range(VFS_I(ip), start_boundary, end_boundary - 1); |