Commit a5c21944 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: remove xfs_refcountbt_stage_cursor

Just open code the two calls in the callers.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 4f2dc69e
...@@ -376,20 +376,6 @@ xfs_refcountbt_init_cursor( ...@@ -376,20 +376,6 @@ xfs_refcountbt_init_cursor(
return cur; return cur;
} }
/* Create a btree cursor with a fake root for staging. */
struct xfs_btree_cur *
xfs_refcountbt_stage_cursor(
struct xfs_mount *mp,
struct xbtree_afakeroot *afake,
struct xfs_perag *pag)
{
struct xfs_btree_cur *cur;
cur = xfs_refcountbt_init_cursor(mp, NULL, NULL, pag);
xfs_btree_stage_afakeroot(cur, afake);
return cur;
}
/* /*
* Swap in the new btree root. Once we pass this point the newly rebuilt btree * Swap in the new btree root. Once we pass this point the newly rebuilt btree
* is in place and we have to kill off all the old btree blocks. * is in place and we have to kill off all the old btree blocks.
......
...@@ -48,8 +48,6 @@ struct xbtree_afakeroot; ...@@ -48,8 +48,6 @@ struct xbtree_afakeroot;
extern struct xfs_btree_cur *xfs_refcountbt_init_cursor(struct xfs_mount *mp, extern struct xfs_btree_cur *xfs_refcountbt_init_cursor(struct xfs_mount *mp,
struct xfs_trans *tp, struct xfs_buf *agbp, struct xfs_trans *tp, struct xfs_buf *agbp,
struct xfs_perag *pag); struct xfs_perag *pag);
struct xfs_btree_cur *xfs_refcountbt_stage_cursor(struct xfs_mount *mp,
struct xbtree_afakeroot *afake, struct xfs_perag *pag);
extern int xfs_refcountbt_maxrecs(int blocklen, bool leaf); extern int xfs_refcountbt_maxrecs(int blocklen, bool leaf);
extern void xfs_refcountbt_compute_maxlevels(struct xfs_mount *mp); extern void xfs_refcountbt_compute_maxlevels(struct xfs_mount *mp);
......
...@@ -658,8 +658,8 @@ xrep_refc_build_new_tree( ...@@ -658,8 +658,8 @@ xrep_refc_build_new_tree(
rr->new_btree.bload.claim_block = xrep_refc_claim_block; rr->new_btree.bload.claim_block = xrep_refc_claim_block;
/* Compute how many blocks we'll need. */ /* Compute how many blocks we'll need. */
refc_cur = xfs_refcountbt_stage_cursor(sc->mp, &rr->new_btree.afake, refc_cur = xfs_refcountbt_init_cursor(sc->mp, NULL, NULL, pag);
pag); xfs_btree_stage_afakeroot(refc_cur, &rr->new_btree.afake);
error = xfs_btree_bload_compute_geometry(refc_cur, error = xfs_btree_bload_compute_geometry(refc_cur,
&rr->new_btree.bload, &rr->new_btree.bload,
xfarray_length(rr->refcount_records)); xfarray_length(rr->refcount_records));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment