xfs: rewrite xfs_bmap_first_unused to make better use of xfs_iext_get_extent
authorChristoph Hellwig <hch@lst.de>
Thu, 19 Oct 2017 18:08:52 +0000 (11:08 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Oct 2017 22:38:28 +0000 (15:38 -0700)
commit29b3e94a9c65224733fe8de49b07b7227f95f821
tree0b6e0316396cc893edfa650ebefa8a615e5c8211
parent5936dc543cfd27de74cd34fdc928b5115cec53d1
xfs: rewrite xfs_bmap_first_unused to make better use of xfs_iext_get_extent

Look at the return value of xfs_iext_get_extent instead of figuring out
the extent count first and looping up to 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>
fs/xfs/libxfs/xfs_bmap.c