From: Yajun Deng <yajun.deng@linux.dev>
To: sj@kernel.org, akpm@linux-foundation.org
Cc: sieberf@amazon.com, shakeelb@google.com, foersleo@amazon.de,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Yajun Deng <yajun.deng@linux.dev>
Subject: [PATCH] mm/damon: fix missing damon_del_region()
Date: Wed, 14 Sep 2022 17:36:36 +0800 [thread overview]
Message-ID: <20220914093636.1184590-1-yajun.deng@linux.dev> (raw)
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
next reply other threads:[~2022-09-14 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 9:36 Yajun Deng [this message]
2022-09-14 9:52 ` SeongJae Park
2022-09-14 10:26 ` Yajun Deng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220914093636.1184590-1-yajun.deng@linux.dev \
--to=yajun.deng@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=foersleo@amazon.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shakeelb@google.com \
--cc=sieberf@amazon.com \
--cc=sj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox