]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: hoist the node iroot update code out of xfs_btree_kill_iroot
authorDarrick J. Wong <djwong@kernel.org>
Mon, 24 Feb 2025 18:21:45 +0000 (10:21 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 25 Feb 2025 17:15:57 +0000 (09:15 -0800)
commitafab9ff346f8142d1928de189aa0530a71589c3f
tree6ebc5f2d4ba51e80f27067a9da77896fbc6d2981
parentee20e655453724ad5061c85d663754f8eedf33b3
xfs: hoist the node iroot update code out of xfs_btree_kill_iroot

Source kernel commit: 505248719fcbf2c76594fe2ef293680d97fe426c

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>
libxfs/xfs_btree.c