summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_btree.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-11-20 16:20:15 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-12-23 13:06:02 -0800
commiteb9bff22311ca47ef4848bbdcf24dae06ae3f243 (patch)
treed6ddb95c39f9a8f60d09633b0c5d1135bf94097e /fs/xfs/libxfs/xfs_btree.c
parent6a92924275ecdd768c8105f8975b971300c5ba7d (diff)
xfs: make xfs_iroot_realloc a bmap btree function
Move the inode fork btree root reallocation function part of the btree ops because it's now mostly bmbt-specific code. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_btree.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
index 5714bec26c20..672746f7217c 100644
--- a/fs/xfs/libxfs/xfs_btree.c
+++ b/fs/xfs/libxfs/xfs_btree.c
@@ -3161,7 +3161,7 @@ xfs_btree_new_iroot(
xfs_btree_copy_ptrs(cur, pp, &nptr, 1);
- xfs_iroot_realloc(cur->bc_ino.ip, cur->bc_ino.whichfork, 1);
+ cur->bc_ops->broot_realloc(cur, 1);
xfs_btree_setbuf(cur, level, cbp);
@@ -3345,8 +3345,7 @@ xfs_btree_make_block_unfull(
if (numrecs < cur->bc_ops->get_dmaxrecs(cur, level)) {
/* A root block that can be made bigger. */
- xfs_iroot_realloc(ip, cur->bc_ino.whichfork,
- numrecs + 1);
+ cur->bc_ops->broot_realloc(cur, numrecs + 1);
*stat = 1;
} else {
/* A root block that needs replacing */
@@ -3758,8 +3757,7 @@ xfs_btree_kill_iroot(
ASSERT(xfs_btree_ptr_is_null(cur, &ptr));
#endif
- block = xfs_iroot_realloc(cur->bc_ino.ip, cur->bc_ino.whichfork,
- numrecs);
+ block = cur->bc_ops->broot_realloc(cur, numrecs);
block->bb_numrecs = be16_to_cpu(numrecs);
ASSERT(block->bb_numrecs == cblock->bb_numrecs);
@@ -3944,8 +3942,7 @@ xfs_btree_delrec(
* nothing left to do. numrecs was decremented above.
*/
if (xfs_btree_at_iroot(cur, level)) {
- xfs_iroot_realloc(cur->bc_ino.ip, cur->bc_ino.whichfork,
- numrecs);
+ cur->bc_ops->broot_realloc(cur, numrecs);
error = xfs_btree_kill_iroot(cur);
if (error)