]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: hoist the node iroot update code out of xfs_btree_kill_iroot
authorDarrick J. Wong <djwong@kernel.org>
Thu, 21 Nov 2024 00:20:17 +0000 (16:20 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 23 Dec 2024 21:06:02 +0000 (13:06 -0800)
commit505248719fcbf2c76594fe2ef293680d97fe426c
treeec81d5a035ae8ee37b5e5049bddf6ca5902eebb0
parent7708951ae52132d3c4e05aee2e57d35f0d89bd49
xfs: hoist the node iroot update code out of xfs_btree_kill_iroot

In preparation for allowing records in an inode btree root, hoist the
code that copies keyptrs from an existing node child into the root block
to a separate function.  Remove some unnecessary conditionals and clean
up a few function calls in the new function.  Note that this change
reorders the ->free_block call with respect to the change in bc_nlevels
to make it easier to support inode root leaf blocks in the next patch.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_btree.c