xfs: don't zap bmbt forks if they are MAXLEVELS tall
authorDarrick J. Wong <djwong@kernel.org>
Tue, 14 Jul 2026 06:07:30 +0000 (23:07 -0700)
committerCarlos Maiolino <cem@kernel.org>
Tue, 14 Jul 2026 09:01:47 +0000 (11:01 +0200)
commit59c462b0f5cfa107794228051724b34ae9334168
treea833d1b6b6a9716daf4f30406ed3848c5f16d1ac
parent15e38a9366b31d3d61081ead115f1dff59379e24
xfs: don't zap bmbt forks if they are MAXLEVELS tall

LOLLM noticed a discrepancy between the bmbt level checks in the libxfs
bmbt code vs. the inode repair code.  We do actually allow a bmbt root
that proclaims to have a height of XFS_BM_MAXLEVELS.

Cc: stable@vger.kernel.org # v6.8
Fixes: e744cef2060559 ("xfs: zap broken inode forks")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/scrub/inode_repair.c