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

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

index 9a2968906c4220283c2a428fbcdb740409469ff9..2adf20ce8a4136f9be0c453375f1221ac199ee14 100644 (file)
 #define xfs_initialize_perag_data      libxfs_initialize_perag_data
 #define xfs_init_local_fork            libxfs_init_local_fork
 
+#define xfs_inobt_init_cursor          libxfs_inobt_init_cursor
 #define xfs_inobt_maxrecs              libxfs_inobt_maxrecs
 #define xfs_inobt_stage_cursor         libxfs_inobt_stage_cursor
 #define xfs_inode_from_disk            libxfs_inode_from_disk
index aa3f586dab015a1db6a52c5df13e926ca379820f..6a34de28293b463c5ea47757a5289c683cf4d271 100644 (file)
@@ -488,20 +488,6 @@ xfs_inobt_init_cursor(
        return cur;
 }
 
-/* Create an inode btree cursor with a fake root for staging. */
-struct xfs_btree_cur *
-xfs_inobt_stage_cursor(
-       struct xfs_perag        *pag,
-       struct xbtree_afakeroot *afake,
-       xfs_btnum_t             btnum)
-{
-       struct xfs_btree_cur    *cur;
-
-       cur = xfs_inobt_init_cursor(pag, NULL, NULL, btnum);
-       xfs_btree_stage_afakeroot(cur, afake);
-       return cur;
-}
-
 /*
  * Install a new inobt btree root.  Caller is responsible for invalidating
  * and freeing the old btree blocks.
index 3262c3fe5ebee0e023acd9f29c8ee1592ea69e2b..40f0fc0e8da37790eee192cbf03d78314362b942 100644 (file)
@@ -48,8 +48,6 @@ struct xfs_perag;
 
 extern struct xfs_btree_cur *xfs_inobt_init_cursor(struct xfs_perag *pag,
                struct xfs_trans *tp, struct xfs_buf *agbp, xfs_btnum_t btnum);
-struct xfs_btree_cur *xfs_inobt_stage_cursor(struct xfs_perag *pag,
-               struct xbtree_afakeroot *afake, xfs_btnum_t btnum);
 extern int xfs_inobt_maxrecs(struct xfs_mount *, int, int);
 
 /* ir_holemask to inode allocation bitmap conversion */
index d5fa4eafb633f36cd8c875fddd4c87fd70b377e2..22e31c47a827bd92c724df29cb5d582d5b03168c 100644 (file)
@@ -524,8 +524,9 @@ init_ino_cursors(
                        fino_recs++;
        }
 
-       btr_ino->cur = libxfs_inobt_stage_cursor(pag, &btr_ino->newbt.afake,
+       btr_ino->cur = libxfs_inobt_init_cursor(pag, NULL, NULL,
                        XFS_BTNUM_INO);
+       libxfs_btree_stage_afakeroot(btr_ino->cur, &btr_ino->newbt.afake);
 
        btr_ino->bload.get_records = get_inobt_records;
        btr_ino->bload.claim_block = rebuild_claim_block;
@@ -544,8 +545,9 @@ _("Unable to compute inode btree geometry, error %d.\n"), error);
                return;
 
        init_rebuild(sc, &XFS_RMAP_OINFO_INOBT, est_agfreeblocks, btr_fino);
-       btr_fino->cur = libxfs_inobt_stage_cursor(pag,
-                       &btr_fino->newbt.afake, XFS_BTNUM_FINO);
+       btr_fino->cur = libxfs_inobt_init_cursor(pag, NULL, NULL,
+                       XFS_BTNUM_FINO);
+       libxfs_btree_stage_afakeroot(btr_fino->cur, &btr_fino->newbt.afake);
 
        btr_fino->bload.get_records = get_inobt_records;
        btr_fino->bload.claim_block = rebuild_claim_block;