]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/damon/lru_sort: use param_ctx for damon_attrs staging
authorSeongJae Park <sj@kernel.org>
Tue, 16 Sep 2025 03:15:49 +0000 (20:15 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 21 Sep 2025 21:22:34 +0000 (14:22 -0700)
commite18190b7e97e9db6546390e6e0ceddae606892b2
treee6add2bdc1c1d0ad910592c81678526593c31874
parente75f15fb69610cf90e9dfa0cbe436ae9342b9b79
mm/damon/lru_sort: use param_ctx for damon_attrs staging

damon_lru_sort_apply_parameters() allocates a new DAMON context, stages
user-specified DAMON parameters on it, and commits to running DAMON
context at once, using damon_commit_ctx().  The code is, however, directly
updating the monitoring attributes of the running context.  And the
attributes are over-written by later damon_commit_ctx() call.  This means
that the monitoring attributes parameters are not really working.  Fix the
wrong use of the parameter context.

Link: https://lkml.kernel.org/r/20250916031549.115326-1-sj@kernel.org
Fixes: a30969436428 ("mm/damon/lru_sort: use damon_commit_ctx()")
Signed-off-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: <stable@vger.kernel.org> [6.11+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/lru_sort.c