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>
This commit is contained in:
Christoph Hellwig 2017-08-29 15:44:14 -07:00 • committed by Darrick J. Wong
commit e17a5c6f0e
2 changed files with 11 additions and 11 deletions