mm/damon/vaddr: put pid in cleanup_target()
Implement cleanup_target() callback for [f]vaddr, which calls put_pid() for each target that will be destroyed. Also remove redundant put_pid() calls in core, sysfs and sample modules, which were required to be done redundantly due to the lack of such self cleanup in vaddr. Link: https://lkml.kernel.org/r/20250712195016.151108-11-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
7114bc5e01
commit
ff01aba6e4
@@ -120,8 +120,6 @@ static void damon_sample_prcl_stop(void)
|
||||
damon_stop(&ctx, 1);
|
||||
damon_destroy_ctx(ctx);
|
||||
}
|
||||
if (target_pidp)
|
||||
put_pid(target_pidp);
|
||||
}
|
||||
|
||||
static bool init_called;
|
||||
|
||||
@@ -100,8 +100,6 @@ static void damon_sample_wsse_stop(void)
|
||||
damon_stop(&ctx, 1);
|
||||
damon_destroy_ctx(ctx);
|
||||
}
|
||||
if (target_pidp)
|
||||
put_pid(target_pidp);
|
||||
}
|
||||
|
||||
static bool init_called;
|
||||
|
||||
Reference in New Issue
Block a user