diff options
| author | SJ Park <sj@kernel.org> | 2026-07-06 07:06:25 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-08-04 19:18:32 -0700 |
| commit | cfd843b299298d7dff51bf86b51eee21e47796b7 (patch) | |
| tree | b2a5044d494edf3ade4477682ca0d4f0e2653a50 /samples/damon | |
| parent | d079b6b890d128c396ee42320c027b7dd3c0a2a7 (diff) | |
samples/damon/wsse: do not stop ctx 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-11-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'samples/damon')
| -rw-r--r-- | samples/damon/wsse.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/samples/damon/wsse.c b/samples/damon/wsse.c index ff5e8a890f44..37fd5da20158 100644 --- a/samples/damon/wsse.c +++ b/samples/damon/wsse.c @@ -93,10 +93,8 @@ static int damon_sample_wsse_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; } |
