6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Darrick J. Wong commit 18028768415e3c05ab7edb22d740e2f4dc52836a upstream. LOLLM points out that it's pointless to rescan the AGs if we've already frozen the filesystem because there won't be any more perturbations. Fix this to mark the scan incomplete and exit. Cc: stable@vger.kernel.org # v5.2 Fixes: 75efa57d0bf5fc ("xfs: add online scrub for superblock counters") 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/fscounters.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/fs/xfs/scrub/fscounters.c +++ b/fs/xfs/scrub/fscounters.c @@ -379,6 +379,11 @@ retry: * to maintain ifree <= icount before giving up. */ if (fsc->ifree > fsc->icount) { + if (fsc->frozen) { + xchk_set_incomplete(sc); + return -EFSCORRUPTED; + } + if (tries--) goto retry; return -EDEADLOCK;