diff mbox series

[9/9] xfs: remove unnecessary fields in xfbtree_config

Message ID 170404994110.1795132.12835250791258551159.stgit@frogsfrogsfrogs (mailing list archive)
State Deferred, archived
Headers show
Series [1/9] xfs: set the btree cursor bc_ops in xfs_btree_alloc_cursor | expand

Commit Message

Darrick J. Wong Dec. 31, 2023, 10:22 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Remove these fields now that we get all the info we need from the btree
ops.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 libxfs/xfbtree.c        |    4 ++--
 libxfs/xfs_btree_mem.h  |    9 ---------
 libxfs/xfs_rmap_btree.c |    1 -
 3 files changed, 2 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/libxfs/xfbtree.c b/libxfs/xfbtree.c
index d76b3d5ea70..b4762393b3a 100644
--- a/libxfs/xfbtree.c
+++ b/libxfs/xfbtree.c
@@ -370,7 +370,7 @@  xfbtree_rec_bytes(
 {
 	unsigned int			blocklen = xfo_to_b(1);
 
-	if (cfg->flags & XFBTREE_CREATE_LONG_PTRS) {
+	if (cfg->btree_ops->geom_flags & XFS_BTREE_LONG_PTRS) {
 		if (xfs_has_crc(mp))
 			return blocklen - XFS_BTREE_LBLOCK_CRC_LEN;
 
@@ -464,7 +464,7 @@  xfbtree_create(
 		goto err_buftarg;
 
 	/* Set up min/maxrecs for this btree. */
-	if (cfg->flags & XFBTREE_CREATE_LONG_PTRS)
+	if (cfg->btree_ops->geom_flags & XFS_BTREE_LONG_PTRS)
 		keyptr_len += sizeof(__be64);
 	else
 		keyptr_len += sizeof(__be32);
diff --git a/libxfs/xfs_btree_mem.h b/libxfs/xfs_btree_mem.h
index 29f97c50304..1f961f3f554 100644
--- a/libxfs/xfs_btree_mem.h
+++ b/libxfs/xfs_btree_mem.h
@@ -17,17 +17,8 @@  struct xfbtree_config {
 
 	/* Owner of this btree. */
 	unsigned long long		owner;
-
-	/* Btree type number */
-	xfs_btnum_t			btnum;
-
-	/* XFBTREE_CREATE_* flags */
-	unsigned int			flags;
 };
 
-/* btree has long pointers */
-#define XFBTREE_CREATE_LONG_PTRS	(1U << 0)
-
 #ifdef CONFIG_XFS_BTREE_IN_XFILE
 unsigned int xfs_btree_mem_head_nlevels(struct xfs_buf *head_bp);
 
diff --git a/libxfs/xfs_rmap_btree.c b/libxfs/xfs_rmap_btree.c
index f1325586433..e36237bf750 100644
--- a/libxfs/xfs_rmap_btree.c
+++ b/libxfs/xfs_rmap_btree.c
@@ -667,7 +667,6 @@  xfs_rmapbt_mem_create(
 	struct xfbtree_config	cfg = {
 		.btree_ops	= &xfs_rmapbt_mem_ops,
 		.target		= target,
-		.btnum		= XFS_BTNUM_RMAP,
 		.owner		= agno,
 	};