[PATCH] mm/damon/core: let kdamond_call() with cancel regardless of maybe_corrupted
From: SeongJae Park
Date: Thu Mar 19 2026 - 23:09:27 EST
Otherwise, damon_call() callers could indefinitely wait [1].
[1] https://sashiko.dev/#/patchset/20260319145218.86197-1-sj%40kernel.org
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
mm/damon/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 37454e8c9c510..3e1890d64d067 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -2680,7 +2680,7 @@ static void kdamond_call(struct damon_ctx *ctx, bool cancel)
complete(&control->completion);
else if (control->canceled && control->dealloc_on_cancel)
kfree(control);
- if (ctx->maybe_corrupted)
+ if (!cancel && ctx->maybe_corrupted)
break;
}
--
2.47.3