mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 18:40:25 -04:00
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>
This commit is contained in:
committed by
Andrew Morton
parent
3a69f16357
commit
0c96decca5
@@ -1361,17 +1361,6 @@ static int damon_sysfs_add_targets(struct damon_ctx *ctx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void damon_sysfs_before_terminate(struct damon_ctx *ctx)
|
||||
{
|
||||
struct damon_target *t, *next;
|
||||
|
||||
if (!damon_target_has_pid(ctx))
|
||||
return;
|
||||
|
||||
damon_for_each_target_safe(t, next, ctx)
|
||||
damon_destroy_target(t, ctx);
|
||||
}
|
||||
|
||||
/*
|
||||
* damon_sysfs_upd_schemes_stats() - Update schemes stats sysfs files.
|
||||
* @data: The kobject wrapper that associated to the kdamond thread.
|
||||
@@ -1516,7 +1505,6 @@ static struct damon_ctx *damon_sysfs_build_ctx(
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
ctx->callback.before_terminate = damon_sysfs_before_terminate;
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user