]> www.infradead.org Git - users/willy/xarray.git/commit
mm/damon/sysfs: use damon_commit_ctx()
authorSeongJae Park <sj@kernel.org>
Tue, 18 Jun 2024 18:18:00 +0000 (11:18 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 4 Jul 2024 02:30:13 +0000 (19:30 -0700)
commit83dc7bbaecae6e69e338355e9a137f0e7a0ecc40
tree741ef88b8aff42d144893d9d490c015d98e67af6
parent9cb3d0b9dfce6a3258d91e6d69e418d0b4cce46a
mm/damon/sysfs: use damon_commit_ctx()

DAMON_SYSFS manually manipulates DAMON context structs 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-4-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/sysfs.c