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/[email protected]
Signed-off-by: SJ Park <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
SJ Park authored and Andrew Morton committed 2026-08-04 19:18:32 -07:00
1 parent d079b6b890
commit cfd843b299
1 file changed
+1 -3
+1 -3
View File
@@ -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;
}