6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Darrick J. Wong commit 1fc241cdeab276dc6c3ec14840faa706ed7712ff upstream. LOLLM complains that we should check for a fatal signal *every* time we walk a record in the rmap btree as part of rebuilding the free space btrees. Fix that, and improve responsiveness to ^C of xfs_scrub. Cc: stable@vger.kernel.org # v6.8 Fixes: 4bdfd7d15747b1 ("xfs: repair free space btrees") Signed-off-by: Darrick J. Wong Assisted-by: LOLLM # finding obvious bugs Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Greg Kroah-Hartman --- fs/xfs/scrub/alloc_repair.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/fs/xfs/scrub/alloc_repair.c +++ b/fs/xfs/scrub/alloc_repair.c @@ -228,7 +228,10 @@ xrep_abt_walk_rmap( void *priv) { struct xrep_abt *ra = priv; - int error; + int error = 0; + + if (xchk_should_terminate(ra->sc, &error)) + return error; /* Record all the OWN_AG blocks... */ if (rec->rm_owner == XFS_RMAP_OWN_AG) {