summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorSJ Park <sj@kernel.org>2026-07-06 07:06:23 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-07-25 21:49:40 -0700
commit912652955f5f676f9082385cdb487dc7d8e6df34 (patch)
treebc0510b817a2cecac9c65ebf7094f160d20ddde2 /samples
parentc5a770796f592d15f851c4600146da3969b0fb86 (diff)
downloadlinux-next-912652955f5f676f9082385cdb487dc7d8e6df34.tar.gz
linux-next-912652955f5f676f9082385cdb487dc7d8e6df34.zip
samples/damon/mtier: stop all contexts with single damon_stop() call
damon_stop() was theoretically able to return failure while keeping the second context for mtier running. mtier stops its contexts one by one with two damon_stop() call for the reason. damon_stop() is refactored to always successfully stop all requested DAMON contexts. The two calls are unnecessary. Use only single damon_stop() call for all contexts. Link: https://lore.kernel.org/20260706140628.87414-9-sj@kernel.org Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'samples')
-rw-r--r--samples/damon/mtier.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c
index 90881e8bd441..ac9c24b92ead 100644
--- a/samples/damon/mtier.c
+++ b/samples/damon/mtier.c
@@ -200,8 +200,7 @@ static int damon_sample_mtier_start(void)
static void damon_sample_mtier_stop(void)
{
- damon_stop(ctxs, 1);
- damon_stop(&ctxs[1], 1);
+ damon_stop(ctxs, 2);
damon_destroy_ctx(ctxs[0]);
damon_destroy_ctx(ctxs[1]);
}