]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
xfs: simplify xfs_bmap_punch_delalloc_range
authorChristoph Hellwig <hch@lst.de>
Fri, 22 Jun 2018 06:24:38 +0000 (23:24 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 22 Jun 2018 06:24:38 +0000 (23:24 -0700)
commite2ac836307e346969737c60075fdb01bed1af503
tree56fe6860df31c4d016db3a430dbad9387f8b4e04
parentce397d215ccd07b8ae3f71db689aedb85d56ab40
xfs: simplify xfs_bmap_punch_delalloc_range

Instead of using xfs_bmapi_read to find delalloc extents and then punch
them out using xfs_bunmapi, opencode the loop to iterate over the extents
and call xfs_bmap_del_extent_delay directly.  This both simplifies the
code and reduces the number of extent tree lookups required.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_bmap_util.c