summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_util.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-05-04 14:06:27 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-05-06 13:17:21 -0700
commit8bc3b5e4b70d28f8edcafc3c9e4de515998eea9e (patch)
tree59e8f1785bb54830afde71283b3e54f6dfcff755 /fs/xfs/xfs_bmap_util.c
parent840d493dff1abb0cb0d73417148a3eeecd5f30d9 (diff)
downloadlinux-8bc3b5e4b70d28f8edcafc3c9e4de515998eea9e.tar.bz2
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>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r--fs/xfs/xfs_bmap_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 4f800f7fe888..cc23a3e23e2d 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1606,7 +1606,7 @@ xfs_swap_extents(
if (xfs_inode_has_cow_data(tip)) {
error = xfs_reflink_cancel_cow_range(tip, 0, NULLFILEOFF, true);
if (error)
- return error;
+ goto out_unlock;
}
/*