“fadf56a14120b1b37ea8fa04c7a6fb01e2b090c7”上不存在“src/git@gitcode.net:openanolis/dragonwell8_jdk.git”
提交 ef97ef26 编写于 作者: D Darrick J. Wong

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: NDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NCarlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
上级 0b04b6b8
...@@ -1675,11 +1675,11 @@ xfs_refcount_recover_cow_leftovers( ...@@ -1675,11 +1675,11 @@ xfs_refcount_recover_cow_leftovers(
high.rc.rc_startblock = -1U; high.rc.rc_startblock = -1U;
error = xfs_btree_query_range(cur, &low, &high, error = xfs_btree_query_range(cur, &low, &high,
xfs_refcount_recover_extent, &debris); xfs_refcount_recover_extent, &debris);
if (error) xfs_btree_del_cursor(cur, error);
goto out_cursor;
xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR);
xfs_trans_brelse(tp, agbp); xfs_trans_brelse(tp, agbp);
xfs_trans_cancel(tp); xfs_trans_cancel(tp);
if (error)
goto out_free;
/* Now iterate the list to free the leftovers */ /* Now iterate the list to free the leftovers */
list_for_each_entry_safe(rr, n, &debris, rr_list) { list_for_each_entry_safe(rr, n, &debris, rr_list) {
...@@ -1727,11 +1727,6 @@ xfs_refcount_recover_cow_leftovers( ...@@ -1727,11 +1727,6 @@ xfs_refcount_recover_cow_leftovers(
kmem_free(rr); kmem_free(rr);
} }
return error; 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? */ /* Is there a record covering a given extent? */
......
...@@ -747,9 +747,9 @@ xfs_repair_dispose_btree_block( ...@@ -747,9 +747,9 @@ xfs_repair_dispose_btree_block(
/* Can we find any other rmappings? */ /* Can we find any other rmappings? */
error = xfs_rmap_has_other_keys(cur, agbno, 1, oinfo, &has_other_rmap); error = xfs_rmap_has_other_keys(cur, agbno, 1, oinfo, &has_other_rmap);
xfs_btree_del_cursor(cur, error);
if (error) if (error)
goto out_cur; goto out_free;
xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR);
/* /*
* If there are other rmappings, this block is cross linked and must * If there are other rmappings, this block is cross linked and must
...@@ -779,8 +779,7 @@ xfs_repair_dispose_btree_block( ...@@ -779,8 +779,7 @@ xfs_repair_dispose_btree_block(
return xfs_trans_roll_inode(&sc->tp, sc->ip); return xfs_trans_roll_inode(&sc->tp, sc->ip);
return xfs_repair_roll_ag_trans(sc); return xfs_repair_roll_ag_trans(sc);
out_cur: out_free:
xfs_btree_del_cursor(cur, XFS_BTREE_ERROR);
if (agf_bp != sc->sa.agf_bp) if (agf_bp != sc->sa.agf_bp)
xfs_trans_brelse(sc->tp, agf_bp); xfs_trans_brelse(sc->tp, agf_bp);
return error; return error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册