aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_refcount.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-07-19 15:29:10 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-23 12:08:00 -0400
commitef97ef26d263fb65f0c7446a10cf93201dc0388c (patch)
treee6e9790ace9fe29a78df729eb509935cf32cba7e /fs/xfs/libxfs/xfs_refcount.c
parent0b04b6b875b32f2b32263ba46d54d001e05724f9 (diff)
xfs: clean up xfs_btree_del_cursor callers
Less trivial cleanups of the error argument to xfs_btree_del_cursor; these require some minor code refactoring. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_refcount.c')
-rw-r--r--fs/xfs/libxfs/xfs_refcount.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_refcount.c b/fs/xfs/libxfs/xfs_refcount.c
index a2dfae67ade1..9ef1f440a6f2 100644
--- a/fs/xfs/libxfs/xfs_refcount.c
+++ b/fs/xfs/libxfs/xfs_refcount.c
@@ -1675,11 +1675,11 @@ xfs_refcount_recover_cow_leftovers(
1675 high.rc.rc_startblock = -1U; 1675 high.rc.rc_startblock = -1U;
1676 error = xfs_btree_query_range(cur, &low, &high, 1676 error = xfs_btree_query_range(cur, &low, &high,
1677 xfs_refcount_recover_extent, &debris); 1677 xfs_refcount_recover_extent, &debris);
1678 if (error) 1678 xfs_btree_del_cursor(cur, error);
1679 goto out_cursor;
1680 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR);
1681 xfs_trans_brelse(tp, agbp); 1679 xfs_trans_brelse(tp, agbp);
1682 xfs_trans_cancel(tp); 1680 xfs_trans_cancel(tp);
1681 if (error)
1682 goto out_free;
1683 1683
1684 /* Now iterate the list to free the leftovers */ 1684 /* Now iterate the list to free the leftovers */
1685 list_for_each_entry_safe(rr, n, &debris, rr_list) { 1685 list_for_each_entry_safe(rr, n, &debris, rr_list) {
@@ -1727,11 +1727,6 @@ out_free:
1727 kmem_free(rr); 1727 kmem_free(rr);
1728 } 1728 }
1729 return error; 1729 return error;
1730
1731out_cursor:
1732 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR);
1733 xfs_trans_brelse(tp, agbp);
1734 goto out_trans;
1735} 1730}
1736 1731
1737/* Is there a record covering a given extent? */ 1732/* Is there a record covering a given extent? */