From: Christoph Hellwig Date: Mon, 22 Apr 2024 17:01:03 +0000 (-0700) Subject: xfs: make full use of xfs_btree_stage_ifakeroot in xfs_bmbt_stage_cursor X-Git-Tag: v6.9.0~18^2~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6536c4295c9c901613540b4251b032f70714182a;p=thirdparty%2Fxfsprogs-dev.git xfs: make full use of xfs_btree_stage_ifakeroot in xfs_bmbt_stage_cursor Source kernel commit: 579d7022d1afea8f4475d1750224ec0b652febee 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino --- diff --git a/libxfs/xfs_bmap_btree.c b/libxfs/xfs_bmap_btree.c index 611f5ed9..dedc33dc 100644 --- a/libxfs/xfs_bmap_btree.c +++ b/libxfs/xfs_bmap_btree.c @@ -611,8 +611,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/libxfs/xfs_btree_staging.c b/libxfs/xfs_btree_staging.c index 5a988a8b..52410fe4 100644 --- a/libxfs/xfs_btree_staging.c +++ b/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; }