diff options
author | Christoph Hellwig | 2018-03-14 07:15:32 +0100 |
---|---|---|
committer | Darrick J. Wong | 2018-03-15 18:31:38 +0100 |
commit | f5c54717bf2b9e052bb69d6ee19fe22e87817079 (patch) | |
tree | 85180b0cccbbd36f387de72e662507592191b808 /fs/xfs/xfs_bmap_util.c | |
parent | xfs: assert that xfs_reflink_allocate_cow is called with XFS_ILOCK_EXCL (diff) | |
download | kernel-qcow2-linux-f5c54717bf2b9e052bb69d6ee19fe22e87817079.tar.gz kernel-qcow2-linux-f5c54717bf2b9e052bb69d6ee19fe22e87817079.tar.xz kernel-qcow2-linux-f5c54717bf2b9e052bb69d6ee19fe22e87817079.zip |
xfs: remove xfs_zero_range
This helper doesn't add any real value over just calling iomap_zero_range
directly, so remove it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 19ea7d086cf8..05dee8fdd895 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c @@ -1208,18 +1208,15 @@ xfs_free_file_space( /* * Now that we've unmap all full blocks we'll have to zero out any - * partial block at the beginning and/or end. xfs_zero_range is - * smart enough to skip any holes, including those we just created, - * but we must take care not to zero beyond EOF and enlarge i_size. + * partial block at the beginning and/or end. iomap_zero_range is smart + * enough to skip any holes, including those we just created, but we + * must take care not to zero beyond EOF and enlarge i_size. */ - if (offset >= XFS_ISIZE(ip)) return 0; - if (offset + len > XFS_ISIZE(ip)) len = XFS_ISIZE(ip) - offset; - - return xfs_zero_range(ip, offset, len, NULL); + return iomap_zero_range(VFS_I(ip), offset, len, NULL, &xfs_iomap_ops); } /* |