xfs: clean up the error handling in xfs_swap_extents
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 4 May 2020 21:06:27 +0000 (14:06 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 6 May 2020 20:17:21 +0000 (13:17 -0700)
commit8bc3b5e4b70d28f8edcafc3c9e4de515998eea9e
tree59e8f1785bb54830afde71283b3e54f6dfcff755
parent840d493dff1abb0cb0d73417148a3eeecd5f30d9
xfs: clean up the error handling in xfs_swap_extents

Make sure we release resources properly if we cannot clean out the COW
extents in preparation for an extent swap.

Fixes: 96987eea537d6c ("xfs: cancel COW blocks before swapext")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_bmap_util.c