xfs: simplify the xfs_bmap_btree_to_extents calling conventions
authorChristoph Hellwig <hch@lst.de>
Fri, 15 Feb 2019 16:02:47 +0000 (08:02 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sun, 17 Feb 2019 19:55:53 +0000 (11:55 -0800)
commitb101e3342a34404f2cc2daaad569afcae68452b0
tree0c678b7ff654fa21298881ccca2f5742ddfe77ae
parentb4e29032f254fed39ef2251807322f36c3ede1aa
xfs: simplify the xfs_bmap_btree_to_extents calling conventions

Move boilerplate code from the callers into xfs_bmap_btree_to_extents:

 - exit early without failure if we don't need to convert to the
   extent format
 - assert that we have a btree cursor
 - don't reinitialize the passed in logflags argument

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/libxfs/xfs_bmap.c