xfs: rewrite xfs_bmap_count_leaves using xfs_iext_get_extent
authorChristoph Hellwig <hch@lst.de>
Tue, 29 Aug 2017 22:44:14 +0000 (15:44 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 1 Sep 2017 20:08:26 +0000 (13:08 -0700)
commite17a5c6f0e3609da83270f42698b1dfedde86f44
tree06e618698006a524252781215dc293a832d59abf
parent4c35445b591ee669097c5b98e4bb677808e9f582
xfs: rewrite xfs_bmap_count_leaves using xfs_iext_get_extent

This avoids poking into the internals of the extent list.  Also return
the number of extents as the return value instead of an additional
by reference argument, and make it available to callers outside of
xfs_bmap_util.c

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>
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_bmap_util.h