diff options
| author | David S. Miller <[email protected]> | 2018-11-25 01:01:43 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-11-25 01:01:43 +0000 |
| commit | b1bf78bfb2e4c9ffa03ccdbc60d89a2f7c5fd82c (patch) | |
| tree | fcd93c3f54a72ca6a6ee97f015efebe6d80a3271 /fs/xfs/xfs_bmap_util.c | |
| parent | ptp: Fix pass zero to ERR_PTR() in ptp_clock_register (diff) | |
| parent | Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm6... (diff) | |
| download | kernel-b1bf78bfb2e4c9ffa03ccdbc60d89a2f7c5fd82c.tar.gz kernel-b1bf78bfb2e4c9ffa03ccdbc60d89a2f7c5fd82c.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
| -rw-r--r-- | fs/xfs/xfs_bmap_util.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 5d263dfdb3bc..404e581f1ea1 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c @@ -1042,7 +1042,7 @@ out_trans_cancel: goto out_unlock; } -static int +int xfs_flush_unmap_range( struct xfs_inode *ip, xfs_off_t offset, @@ -1195,13 +1195,7 @@ xfs_prepare_shift( * Writeback and invalidate cache for the remainder of the file as we're * about to shift down every extent from offset to EOF. */ - error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, offset, -1); - if (error) - return error; - error = invalidate_inode_pages2_range(VFS_I(ip)->i_mapping, - offset >> PAGE_SHIFT, -1); - if (error) - return error; + error = xfs_flush_unmap_range(ip, offset, XFS_ISIZE(ip)); /* * Clean out anything hanging around in the cow fork now that |
