mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 06:17:27 +02:00
samples/damon/prcl: do not stop DAMON for damon_call() failure
damon_call() failure was causing the context to be stopped, but asynchronously by the kdamond thread. To handle the race, the caller had to stop the context. damon_call() is updated to do the stop on its own. Remove the damon_stop() call from the damon_call() error handling. Link: https://lore.kernel.org/20260706140628.87414-12-sj@kernel.org Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
cfd843b299
commit
b1cc60c13b
|
|
@ -113,10 +113,8 @@ static int damon_sample_prcl_start(void)
|
|||
|
||||
repeat_call_control.data = ctx;
|
||||
err = damon_call(ctx, &repeat_call_control);
|
||||
if (err) {
|
||||
damon_stop(&ctx, 1);
|
||||
if (err)
|
||||
damon_destroy_ctx(ctx);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user