]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove xfs_rmapbt_stage_cursor
authorChristoph Hellwig <hch@lst.de>
Mon, 22 Apr 2024 17:01:03 +0000 (10:01 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:38 +0000 (11:37 -0700)
Source kernel commit: 1317813290be04bc37196c4adf457712238c7faa

xfs_rmapbt_stage_cursor is currently unused, but future callers can
trivially open code the two calls.

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>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_rmap_btree.c
libxfs/xfs_rmap_btree.h
repair/agbtree.c

index fabab29e25cec4ec135fe10e8f02edd0bd03340f..5fad7f20b9d6fb12c09ba234e89f6ce646cd44e9 100644 (file)
@@ -526,20 +526,6 @@ xfs_rmapbt_init_cursor(
        return cur;
 }
 
-/* Create a new reverse mapping btree cursor with a fake root for staging. */
-struct xfs_btree_cur *
-xfs_rmapbt_stage_cursor(
-       struct xfs_mount        *mp,
-       struct xbtree_afakeroot *afake,
-       struct xfs_perag        *pag)
-{
-       struct xfs_btree_cur    *cur;
-
-       cur = xfs_rmapbt_init_cursor(mp, NULL, NULL, pag);
-       xfs_btree_stage_afakeroot(cur, afake);
-       return cur;
-}
-
 /*
  * Install a new reverse mapping btree root.  Caller is responsible for
  * invalidating and freeing the old btree blocks.
index 3244715dd111bd530b1b878829bd930fb41cb867..27536d7e14aac825edd4570c1cfdc8e51b151349 100644 (file)
@@ -44,8 +44,6 @@ struct xbtree_afakeroot;
 struct xfs_btree_cur *xfs_rmapbt_init_cursor(struct xfs_mount *mp,
                                struct xfs_trans *tp, struct xfs_buf *bp,
                                struct xfs_perag *pag);
-struct xfs_btree_cur *xfs_rmapbt_stage_cursor(struct xfs_mount *mp,
-               struct xbtree_afakeroot *afake, struct xfs_perag *pag);
 void xfs_rmapbt_commit_staged_btree(struct xfs_btree_cur *cur,
                struct xfs_trans *tp, struct xfs_buf *agbp);
 int xfs_rmapbt_maxrecs(int blocklen, int leaf);
index 395ced6cffcb8e08442d7df34feb1ec113d2b7d2..ab97c1d79ba1e95ff9dc0a2f47dca0908aa16d72 100644 (file)
@@ -637,7 +637,8 @@ init_rmapbt_cursor(
                return;
 
        init_rebuild(sc, &XFS_RMAP_OINFO_AG, est_agfreeblocks, btr);
-       btr->cur = libxfs_rmapbt_stage_cursor(sc->mp, &btr->newbt.afake, pag);
+       btr->cur = libxfs_rmapbt_init_cursor(sc->mp, NULL, NULL, pag);
+       libxfs_btree_stage_afakeroot(btr->cur, &btr->newbt.afake);
 
        btr->bload.get_records = get_rmapbt_records;
        btr->bload.claim_block = rebuild_claim_block;