Commit 579d7022 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 13178132
...@@ -612,8 +612,6 @@ xfs_bmbt_stage_cursor( ...@@ -612,8 +612,6 @@ xfs_bmbt_stage_cursor(
/* data fork always has larger maxheight */ /* data fork always has larger maxheight */
cur = xfs_bmbt_init_common(mp, NULL, ip, XFS_DATA_FORK); 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. */ /* Don't let anyone think we're attached to the real fork yet. */
cur->bc_ino.whichfork = -1; cur->bc_ino.whichfork = -1;
......
...@@ -133,6 +133,7 @@ xfs_btree_stage_ifakeroot( ...@@ -133,6 +133,7 @@ xfs_btree_stage_ifakeroot(
cur->bc_ino.ifake = ifake; cur->bc_ino.ifake = ifake;
cur->bc_nlevels = ifake->if_levels; cur->bc_nlevels = ifake->if_levels;
cur->bc_ino.forksize = ifake->if_fork_size;
cur->bc_flags |= XFS_BTREE_STAGING; cur->bc_flags |= XFS_BTREE_STAGING;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment