diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-04-18 10:45:02 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-04-18 10:45:02 +0200 |
| commit | 6e93ccc29258103e1fc652464b4ff75bc022da73 (patch) | |
| tree | 85f741fa600ee0745b818a8c9cfdfc9b5b824c86 /mm/damon/stat.c | |
| parent | 327d73d5ef3ac25ffb58648c2c588c897b7efc41 (diff) | |
| parent | 47a33eea6d5145d53e42315381ef28286c2218fb (diff) | |
Merge v6.18.23linux-rolling-lts
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/damon/stat.c')
| -rw-r--r-- | mm/damon/stat.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/damon/stat.c b/mm/damon/stat.c index a8d6a30498300..3a55f6e41dc4c 100644 --- a/mm/damon/stat.c +++ b/mm/damon/stat.c @@ -237,6 +237,12 @@ static int damon_stat_start(void) { int err; + if (damon_stat_context) { + if (damon_is_running(damon_stat_context)) + return -EAGAIN; + damon_destroy_ctx(damon_stat_context); + } + damon_stat_context = damon_stat_build_ctx(); if (!damon_stat_context) return -ENOMEM; @@ -253,6 +259,7 @@ static void damon_stat_stop(void) { damon_stop(&damon_stat_context, 1); damon_destroy_ctx(damon_stat_context); + damon_stat_context = NULL; } static int damon_stat_enabled_store( |
