]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: pass runtime errors from xrep_iunlink_mark_ondisk_rec up to callers
authorDarrick J. Wong <djwong@kernel.org>
Mon, 27 Jul 2026 05:25:35 +0000 (22:25 -0700)
committerCarlos Maiolino <cem@kernel.org>
Mon, 3 Aug 2026 08:20:43 +0000 (10:20 +0200)
commit5644fab990fc72406dddc91cbb8304659d77f3f1
treef9880b862f712eaa0eba861f984efcdfc16acbee
parent6b9cd540138a06660a843a519facc147060acbef
xfs: pass runtime errors from xrep_iunlink_mark_ondisk_rec up to callers

LOLLM points out that the only error that xrep_iunlink_mark_ondisk_rec
returns is ENOMEM, but we ignore that, and can end up writing a garbage
AGI based on incomplete information.  We shouldn't do that, though here
we must be screen out EFSCORRUPTED/EFSBASDCRC because we haven't
checked the inobt yet.

Cc: stable@vger.kernel.org # v6.10
Fixes: ab97f4b1c03075 ("xfs: repair AGI unlinked inode bucket lists")
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/agheader_repair.c