xfs: remove xfs_allocbt_stage_cursor
Just open code the two calls in the callers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
committed by
Darrick J. Wong
parent
fb518f8eeb
commit
91796b2eef
@@ -548,21 +548,6 @@ xfs_allocbt_init_cursor(
|
|||||||
return cur;
|
return cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a free space btree cursor with a fake root for staging. */
|
|
||||||
struct xfs_btree_cur *
|
|
||||||
xfs_allocbt_stage_cursor(
|
|
||||||
struct xfs_mount *mp,
|
|
||||||
struct xbtree_afakeroot *afake,
|
|
||||||
struct xfs_perag *pag,
|
|
||||||
xfs_btnum_t btnum)
|
|
||||||
{
|
|
||||||
struct xfs_btree_cur *cur;
|
|
||||||
|
|
||||||
cur = xfs_allocbt_init_cursor(mp, NULL, NULL, pag, btnum);
|
|
||||||
xfs_btree_stage_afakeroot(cur, afake);
|
|
||||||
return cur;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Install a new free space btree root. Caller is responsible for invalidating
|
* Install a new free space btree root. Caller is responsible for invalidating
|
||||||
* and freeing the old btree blocks.
|
* and freeing the old btree blocks.
|
||||||
|
@@ -50,9 +50,6 @@ struct xbtree_afakeroot;
|
|||||||
extern struct xfs_btree_cur *xfs_allocbt_init_cursor(struct xfs_mount *mp,
|
extern struct xfs_btree_cur *xfs_allocbt_init_cursor(struct xfs_mount *mp,
|
||||||
struct xfs_trans *tp, struct xfs_buf *bp,
|
struct xfs_trans *tp, struct xfs_buf *bp,
|
||||||
struct xfs_perag *pag, xfs_btnum_t btnum);
|
struct xfs_perag *pag, xfs_btnum_t btnum);
|
||||||
struct xfs_btree_cur *xfs_allocbt_stage_cursor(struct xfs_mount *mp,
|
|
||||||
struct xbtree_afakeroot *afake, struct xfs_perag *pag,
|
|
||||||
xfs_btnum_t btnum);
|
|
||||||
extern int xfs_allocbt_maxrecs(struct xfs_mount *, int, int);
|
extern int xfs_allocbt_maxrecs(struct xfs_mount *, int, int);
|
||||||
extern xfs_extlen_t xfs_allocbt_calc_size(struct xfs_mount *mp,
|
extern xfs_extlen_t xfs_allocbt_calc_size(struct xfs_mount *mp,
|
||||||
unsigned long long len);
|
unsigned long long len);
|
||||||
|
@@ -735,10 +735,13 @@ xrep_abt_build_new_trees(
|
|||||||
ra->new_cntbt.bload.claim_block = xrep_abt_claim_block;
|
ra->new_cntbt.bload.claim_block = xrep_abt_claim_block;
|
||||||
|
|
||||||
/* Allocate cursors for the staged btrees. */
|
/* Allocate cursors for the staged btrees. */
|
||||||
bno_cur = xfs_allocbt_stage_cursor(sc->mp, &ra->new_bnobt.afake,
|
bno_cur = xfs_allocbt_init_cursor(sc->mp, NULL, NULL, pag,
|
||||||
pag, XFS_BTNUM_BNO);
|
XFS_BTNUM_BNO);
|
||||||
cnt_cur = xfs_allocbt_stage_cursor(sc->mp, &ra->new_cntbt.afake,
|
xfs_btree_stage_afakeroot(bno_cur, &ra->new_bnobt.afake);
|
||||||
pag, XFS_BTNUM_CNT);
|
|
||||||
|
cnt_cur = xfs_allocbt_init_cursor(sc->mp, NULL, NULL, pag,
|
||||||
|
XFS_BTNUM_CNT);
|
||||||
|
xfs_btree_stage_afakeroot(cnt_cur, &ra->new_cntbt.afake);
|
||||||
|
|
||||||
/* Last chance to abort before we start committing fixes. */
|
/* Last chance to abort before we start committing fixes. */
|
||||||
if (xchk_should_terminate(sc, &error))
|
if (xchk_should_terminate(sc, &error))
|
||||||
|
Reference in New Issue
Block a user