]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/damon/reclaim: use damon_commit_ctx()
authorSeongJae Park <sj@kernel.org>
Tue, 18 Jun 2024 18:18:06 +0000 (11:18 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 4 Jul 2024 02:30:14 +0000 (19:30 -0700)
commit11ddcfc257a3e8d7b13b42148ee7e783f4876da4
tree90b1702b3147dcb53bc1b8ed71096ad323bee9de
parenta83364a2164acf01fae9e5388648502388b4a12e
mm/damon/reclaim: use damon_commit_ctx()

DAMON_RECLAIM manually manipulates the DAMON context struct for online
parameters update.  Since the struct contains not only input parameters
but also internal status and operation results, it is not that simple.
Indeed, we found and fixed a few bugs in the code.  Now DAMON core layer
provides a function for the usage, namely damon_commit_ctx().  Replace the
manual manipulation logic with the function.  The core layer function
could have its own bugs, but this change removes a source of bugs.

Link: https://lkml.kernel.org/r/20240618181809.82078-10-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/reclaim.c