linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/damon: fix missing damon_del_region()
@ 2022-09-14  9:36 Yajun Deng
  2022-09-14  9:52 ` SeongJae Park
  0 siblings, 1 reply; 3+ messages in thread
From: Yajun Deng @ 2022-09-14  9:36 UTC (permalink / raw)
  To: sj, akpm
  Cc: sieberf, shakeelb, foersleo, damon, linux-mm, linux-kernel, Yajun Deng

It should be called damon_del_region() before free each region, so use
damon_destroy_region() instead of damon_free_region().

Fixes: f23b8eee1871 (mm/damon/core: implement region-based sampling)
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
 mm/damon/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/damon/core.c b/mm/damon/core.c
index 0b1eb945c68a..e62e7ebf4b12 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -361,7 +361,7 @@ void damon_free_target(struct damon_target *t)
 	struct damon_region *r, *next;
 
 	damon_for_each_region_safe(r, next, t)
-		damon_free_region(r);
+		damon_destroy_region(r, t);
 	kfree(t);
 }
 
-- 
2.25.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-14 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14  9:36 [PATCH] mm/damon: fix missing damon_del_region() Yajun Deng
2022-09-14  9:52 ` SeongJae Park
2022-09-14 10:26   ` Yajun Deng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox