From d4614161fb6d4a56ead3e8e3e9cafa83a54747e4 Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Sat, 12 Jul 2025 12:50:10 -0700 Subject: [PATCH] mm/damon/core: do not call ops.cleanup() when destroying targets damon_operations.cleanup() is documented to be called for kdamond termination, but also being called for targets destruction, which is done for any damon_ctx destruction. Nobody is using the callback for now, though. Remove the cleanup() call under the destruction. Link: https://lkml.kernel.org/r/20250712195016.151108-9-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton --- mm/damon/core.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index ffb87497dbb5e..b82a838b5a0e8 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -550,11 +550,6 @@ static void damon_destroy_targets(struct damon_ctx *ctx) { struct damon_target *t, *next_t; - if (ctx->ops.cleanup) { - ctx->ops.cleanup(ctx); - return; - } - damon_for_each_target_safe(t, next_t, ctx) damon_destroy_target(t); } -- 2.47.2