From patchwork Wed Sep 14 09:36:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yajun Deng X-Patchwork-Id: 12975902 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC8C3ECAAD8 for ; Wed, 14 Sep 2022 09:37:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6EB298D0002; Wed, 14 Sep 2022 05:37:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 673C98D0001; Wed, 14 Sep 2022 05:37:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5143E8D0002; Wed, 14 Sep 2022 05:37:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3D4698D0001 for ; Wed, 14 Sep 2022 05:37:14 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 10AFF40A8B for ; Wed, 14 Sep 2022 09:37:14 +0000 (UTC) X-FDA: 79910187588.27.5502E3E Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by imf01.hostedemail.com (Postfix) with ESMTP id 88DDA400A0 for ; Wed, 14 Sep 2022 09:37:13 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1663148231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=hHiFxLoQl7nFkGX8kgtVUXbRSPMp0KpED73uMSjHu+w=; b=VoSrXwXuRHkuMJqgFeh5tLtjh1NB+Ha72/uvICQk9QNQ0pkQ03EOA93YfkOxxjmDqWxgrR 8MYTYS34zwlstEhfu5gl+oJ43Iu4OeA6gADuRa1He9hy+nycYoP5A6zpOG5V9cmFBsW2yk h4tFSd/Q9+2rr/XMyyF4obkf2M4yTOk= From: Yajun Deng 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 Subject: [PATCH] mm/damon: fix missing damon_del_region() Date: Wed, 14 Sep 2022 17:36:36 +0800 Message-Id: <20220914093636.1184590-1-yajun.deng@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663148233; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=hHiFxLoQl7nFkGX8kgtVUXbRSPMp0KpED73uMSjHu+w=; b=Pjf1nzuBPleoXl8mUoWjX1GswIh8/Ue+BaA3coNnUmjhOLOK7uh58BzOP9hwl2vrCbjyt5 57B4xC+jkJcRdYCzyTGh2tDejry17QR/qMRURgnJyuukZEpxb1AgAT3jM7JyA1lO9cu1um vv138jEzKdUiWCgQDOjrmGP2woSJ75s= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=VoSrXwXu; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf01.hostedemail.com: domain of yajun.deng@linux.dev designates 94.23.1.103 as permitted sender) smtp.mailfrom=yajun.deng@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663148233; a=rsa-sha256; cv=none; b=Tcr4vsbjWnkaFu/9uFXcJkhz5LuPgFpkE7du6Al8uR28L0gRYjBgX4elkMbzYM6i3pk5vA EK3Qea5TK3aDXr0nFc0CvuyD3j6QWSZxoM77q0JHGPIw80VKmCY5SLCr1ctyKNRu0OwWJk FY6Iop6EyVyvxRgEKXlkGuwozGkwVzE= Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=VoSrXwXu; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf01.hostedemail.com: domain of yajun.deng@linux.dev designates 94.23.1.103 as permitted sender) smtp.mailfrom=yajun.deng@linux.dev X-Stat-Signature: umzk86ysk3ii5bwk4ab8rmh7fd3i1qbf X-Rspamd-Queue-Id: 88DDA400A0 X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1663148233-728625 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000462, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 --- 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); }