From a8a538b5578cb0851646af20b647201061e4aba7 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 4 Oct 2018 21:36:09 -0500 Subject: [PATCH] xfs: clean up xfs_btree_del_cursor callers Source kernel commit: ef97ef26d263fb65f0c7446a10cf93201dc0388c Less trivial cleanups of the error argument to xfs_btree_del_cursor; these require some minor code refactoring. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- libxfs/xfs_refcount.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libxfs/xfs_refcount.c b/libxfs/xfs_refcount.c index fabbacd46..8900d89e1 100644 --- a/libxfs/xfs_refcount.c +++ b/libxfs/xfs_refcount.c @@ -1674,11 +1674,11 @@ xfs_refcount_recover_cow_leftovers( high.rc.rc_startblock = -1U; error = xfs_btree_query_range(cur, &low, &high, xfs_refcount_recover_extent, &debris); - if (error) - goto out_cursor; - xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); + xfs_btree_del_cursor(cur, error); xfs_trans_brelse(tp, agbp); xfs_trans_cancel(tp); + if (error) + goto out_free; /* Now iterate the list to free the leftovers */ list_for_each_entry_safe(rr, n, &debris, rr_list) { @@ -1726,11 +1726,6 @@ out_free: kmem_free(rr); } return error; - -out_cursor: - xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); - xfs_trans_brelse(tp, agbp); - goto out_trans; } /* Is there a record covering a given extent? */ -- 2.47.3