summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-02-22 12:39:43 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 12:39:43 -0800
commit579d7022d1afea8f4475d1750224ec0b652febee (patch)
tree8d9f3701d91a0e8bfb42936a2384b852721ab94e /fs/xfs
parent1317813290be04bc37196c4adf457712238c7faa (diff)
downloadlinux-579d7022d1afea8f4475d1750224ec0b652febee.tar.gz
linux-579d7022d1afea8f4475d1750224ec0b652febee.tar.bz2
linux-579d7022d1afea8f4475d1750224ec0b652febee.zip
xfs: make full use of xfs_btree_stage_ifakeroot in xfs_bmbt_stage_cursor
Remove the duplicate cur->bc_nlevels assignment in xfs_bmbt_stage_cursor, and move the cur->bc_ino.forksize assignment into xfs_btree_stage_ifakeroot as it is part of setting up the fake btree root. 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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/libxfs/xfs_bmap_btree.c2
-rw-r--r--fs/xfs/libxfs/xfs_btree_staging.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c
index ec0b970157ae..3b6f14196c8c 100644
--- a/fs/xfs/libxfs/xfs_bmap_btree.c
+++ b/fs/xfs/libxfs/xfs_bmap_btree.c
@@ -612,8 +612,6 @@ xfs_bmbt_stage_cursor(
/* data fork always has larger maxheight */
cur = xfs_bmbt_init_common(mp, NULL, ip, XFS_DATA_FORK);
- cur->bc_nlevels = ifake->if_levels;
- cur->bc_ino.forksize = ifake->if_fork_size;
/* Don't let anyone think we're attached to the real fork yet. */
cur->bc_ino.whichfork = -1;
diff --git a/fs/xfs/libxfs/xfs_btree_staging.c b/fs/xfs/libxfs/xfs_btree_staging.c
index 185d6c3bbc02..d721719f759a 100644
--- a/fs/xfs/libxfs/xfs_btree_staging.c
+++ b/fs/xfs/libxfs/xfs_btree_staging.c
@@ -133,6 +133,7 @@ xfs_btree_stage_ifakeroot(
cur->bc_ino.ifake = ifake;
cur->bc_nlevels = ifake->if_levels;
+ cur->bc_ino.forksize = ifake->if_fork_size;
cur->bc_flags |= XFS_BTREE_STAGING;
}