diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c index b0f7c60d655a..cce2c8a296e2 100644 --- a/mm/damon/sysfs.c +++ b/mm/damon/sysfs.c @@ -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; }