From e704cd7074e7d5c2688cb6682c06c51f869ef881 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 21 Jul 2025 18:26:40 -0400 Subject: [PATCH] Fix masking of EIO in compact_logs. Several of the inconsistency error paths already correctly `goto out` but this one has a `break`. This would result in doing a whole lot of work on corrupted data. Make this error path go to `out` instead as the others do. Signed-off-by: Auke Kok --- kmod/src/srch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/srch.c b/kmod/src/srch.c index f051d374..4f08be0c 100644 --- a/kmod/src/srch.c +++ b/kmod/src/srch.c @@ -1865,7 +1865,7 @@ static int compact_logs(struct super_block *sb, if (pos > SCOUTFS_SRCH_BLOCK_SAFE_BYTES) { /* can only be inconsistency :/ */ ret = -EIO; - break; + goto out; } ret = decode_entry(srb->entries + pos, sre, &prev);