From patchwork Thu Jun 9 18:18:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 12875897 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 E4D4BC43334 for ; Thu, 9 Jun 2022 18:18:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 69F1D8D0037; Thu, 9 Jun 2022 14:18:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 64ED38D0034; Thu, 9 Jun 2022 14:18:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 517278D0037; Thu, 9 Jun 2022 14:18:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 44B718D0034 for ; Thu, 9 Jun 2022 14:18:52 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 1958D6152C for ; Thu, 9 Jun 2022 18:18:52 +0000 (UTC) X-FDA: 79559508504.19.5B25A7C Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf02.hostedemail.com (Postfix) with ESMTP id 7A39A8003E for ; Thu, 9 Jun 2022 18:18:51 +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=1654798730; 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=EsGrAYAp6IJFxcDVn2/7Z4jT50O8LabBUCsC9BUqAmM=; b=XNdLbz37TBFf1v0b6csPsvWj5sDWbvqbE7S1KwnxS4SfiEscQLGgb7f5GXJzS9M1Gfrm0u tNERjdG7bv4iyPAyQkwUJmp5G6Q6965x/8gnLOV1CuT2rdkawheBHtlDCc/DurG82Y82fe J9SQ+dLevT+gkykVqB7AQ/67U/n49os= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH v2 1/3] mm: rename kernel_init_free_pages to kernel_init_pages Date: Thu, 9 Jun 2022 20:18:45 +0200 Message-Id: <1ecaffc0a9c1404d4d7cf52efe0b2dc8a0c681d8.1654798516.git.andreyknvl@google.com> 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=1654798731; 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=EsGrAYAp6IJFxcDVn2/7Z4jT50O8LabBUCsC9BUqAmM=; b=GuPDoxWVQ0342ZZIWxo8g61jTMimGNt94wnxhQMzUC5tGgakawHQVutA32St5jNbJU+X3E iLLhphsRAolCmqHZ4Y0rBhYseKBBXZ9mRkZx4F6vfaOGQUzDuF6X+A2VGhLZsvRfASw4Ll PwxFBLFRr4XmmKWWTKBP3vWdKENukKo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654798731; a=rsa-sha256; cv=none; b=Agle+QoxB7X52PJeStiZ6JlIGFwFCz12M/WI+CexfR+ZmYPy26oYHutsNgaYRxySNoA7pg wVxG624k61TNU+DL8xKshXj2LMnL6Fna4FMSNOsx1do66w6U5JhN0ZoRU6x0+/7yxHuWCc h+u0C1J0BBrPZzrE/O43yeWPNeOrKlA= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=XNdLbz37; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf02.hostedemail.com: domain of andrey.konovalov@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev X-Rspamd-Server: rspam11 X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=XNdLbz37; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf02.hostedemail.com: domain of andrey.konovalov@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev X-Stat-Signature: nxysbx3wdzomi6pcny8uq8gx54jhj3t5 X-Rspamd-Queue-Id: 7A39A8003E X-HE-Tag: 1654798731-995339 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrey Konovalov Rename kernel_init_free_pages() to kernel_init_pages(). This function is not only used for free pages but also for pages that were just allocated. Signed-off-by: Andrey Konovalov Reviewed-by: Muchun Song --- mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e008a3df0485..66ef8c310dce 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1296,7 +1296,7 @@ static inline bool should_skip_kasan_poison(struct page *page, fpi_t fpi_flags) PageSkipKASanPoison(page); } -static void kernel_init_free_pages(struct page *page, int numpages) +static void kernel_init_pages(struct page *page, int numpages) { int i; @@ -1396,7 +1396,7 @@ static __always_inline bool free_pages_prepare(struct page *page, init = false; } if (init) - kernel_init_free_pages(page, 1 << order); + kernel_init_pages(page, 1 << order); /* * arch_free_page() can make the page's contents inaccessible. s390 @@ -2441,7 +2441,7 @@ inline void post_alloc_hook(struct page *page, unsigned int order, } /* If memory is still not initialized, do it now. */ if (init) - kernel_init_free_pages(page, 1 << order); + kernel_init_pages(page, 1 << order); /* Propagate __GFP_SKIP_KASAN_POISON to page flags. */ if (kasan_hw_tags_enabled() && (gfp_flags & __GFP_SKIP_KASAN_POISON)) SetPageSkipKASanPoison(page);