Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/damon/sysfs: remove damon_sysfs_before_terminate()

DAMON core layer does target cleanup on its own. Remove duplicated and
unnecessarily selective cleanup attempts in DAMON sysfs interface.

Link: https://lkml.kernel.org/r/20250712195016.151108-14-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

SeongJae Park and committed by
Andrew Morton
0c96decc 3a69f163

-12
-12
mm/damon/sysfs.c
··· 1361 1361 return 0; 1362 1362 } 1363 1363 1364 - static void damon_sysfs_before_terminate(struct damon_ctx *ctx) 1365 - { 1366 - struct damon_target *t, *next; 1367 - 1368 - if (!damon_target_has_pid(ctx)) 1369 - return; 1370 - 1371 - damon_for_each_target_safe(t, next, ctx) 1372 - damon_destroy_target(t, ctx); 1373 - } 1374 - 1375 1364 /* 1376 1365 * damon_sysfs_upd_schemes_stats() - Update schemes stats sysfs files. 1377 1366 * @data: The kobject wrapper that associated to the kdamond thread. ··· 1505 1516 return ERR_PTR(err); 1506 1517 } 1507 1518 1508 - ctx->callback.before_terminate = damon_sysfs_before_terminate; 1509 1519 return ctx; 1510 1520 } 1511 1521