mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
mm/damon/reclaim: use damon_kdamond_pid()
DAMON_RECLAIM directly uses damon_ctx->kdamond field with manual synchronization using damon_ctx->kdamond_lock, to get the pid of the kdamond. Use a new dedicated function for the purpose, namely damon_kdamond_pid(), since that doesn't require manual and error-prone synchronization. Link: https://lkml.kernel.org/r/20260115152047.68415-5-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
306550f0a5
commit
33402229d2
|
|
@ -307,7 +307,9 @@ static int damon_reclaim_turn(bool on)
|
|||
err = damon_start(&ctx, 1, true);
|
||||
if (err)
|
||||
return err;
|
||||
kdamond_pid = ctx->kdamond->pid;
|
||||
kdamond_pid = damon_kdamond_pid(ctx);
|
||||
if (kdamond_pid < 0)
|
||||
return kdamond_pid;
|
||||
return damon_call(ctx, &call_control);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user