xfs: consolidate btree block verification
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Feb 2024 20:40:57 +0000 (12:40 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:40:57 +0000 (12:40 -0800)
commit4ce0c711d9ab3a435bc605cd2f36a3f6b4e12c05
tree1cdc83b7d4b546790fe8a0559d11bde028e6b3a9
parentd477f1749f00899c71605ea01aba0ce67e030471
xfs: consolidate btree block verification

Add a __xfs_btree_check_block helper that can be called by the scrub code
to validate a btree block of any form, and move the duplicate error
handling code from xfs_btree_check_sblock and xfs_btree_check_lblock into
xfs_btree_check_block and thus remove these two helpers.

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>
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_btree.h
fs/xfs/scrub/btree.c