Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp315641pxj; Thu, 3 Jun 2021 07:24:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2DMF7iTyzFaD5DLp2o0WSW7uk/7M7Gw21tv4QFKOXLQ4KoBQ5mvdIUIlWMBZjo7LQc4kV X-Received: by 2002:a17:906:abcc:: with SMTP id kq12mr40344730ejb.97.1622730296328; Thu, 03 Jun 2021 07:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622730296; cv=none; d=google.com; s=arc-20160816; b=wx3+2eMsEyWqv13Q3L79Y/8dL1d6aFz/N8kiNMxY9nt59vD67jjKfJvy8zGHFfzk1B LCEBgYSUUq7cKqIdWz9p6STqcJfBNM2hs8zDZ1fxFkIBuPDmEen5gv6mt1u3P92Wrdf/ uWaL2uNw6lj/rOjubJRs7J0ijjZc6pf+fAU+vnzwMRduEZ/x4g0bhpI6iHjorBIMeqrQ q7nKHqnjT4IL357DXd/gyUdrC97O7Q9VgoA1L91z9uLYG1imQwf0TY9iM7nIHsF2+vxk CYSZLymb3yUNI/wlgNvmzevML3BQAdgsf3txYwv7sA9jJ2TDlmG4f9RAeWJUkSWh9yLD alOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CsaIUtoKvv03G+bIcxc6UpVBu8c4+npdBJFR9ASWWv4=; b=JJjapZRbFX/4UfLgAi6eYkSUJ+4FamhCkbPiA+l9X4Qxi/nkrtSeKZTI7fkuKaWdFB O3wfxzAZTQ42/CrFL3/ICcf7ODKY/kTNNdqmoeaMW7njoK1xJmxrJ7NwBlK1sreUMqAf dX2SqoqfI8abeRuYhrjw4pVMxLY02S/gHycF3LUws4NADBuzKYUMnEuycWgnK91LQcTN ji5IRJfRvhqdIXqq7WpZKhqUVENEGuObGMvNGS0JkM/D8D/Auv2kKoMbb7Xx1j8qiO29 vOA28T5yt9IovBfpNGW8n+Qy7bs3amtuZTXKazy9iVaNqpwHfQUjUr9WRlkiZ7fq3dOX 1NCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si404330eds.594.2021.06.03.07.24.33; Thu, 03 Jun 2021 07:24:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231535AbhFCOY0 (ORCPT + 99 others); Thu, 3 Jun 2021 10:24:26 -0400 Received: from outbound-smtp10.blacknight.com ([46.22.139.15]:35943 "EHLO outbound-smtp10.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231534AbhFCOY0 (ORCPT ); Thu, 3 Jun 2021 10:24:26 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp10.blacknight.com (Postfix) with ESMTPS id 0A7F41C4723 for ; Thu, 3 Jun 2021 15:22:41 +0100 (IST) Received: (qmail 28417 invoked from network); 3 Jun 2021 14:22:40 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPA; 3 Jun 2021 14:22:40 -0000 From: Mel Gorman To: Andrew Morton Cc: Dave Hansen , Vlastimil Babka , Michal Hocko , Jesper Dangaard Brouer , LKML , Linux-MM , Mel Gorman Subject: [PATCH 1/2] mm/page_alloc: Move free_the_page Date: Thu, 3 Jun 2021 15:22:19 +0100 Message-Id: <20210603142220.10851-2-mgorman@techsingularity.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210603142220.10851-1-mgorman@techsingularity.net> References: <20210603142220.10851-1-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the next page, free_compount_page is going to use the common helper free_the_page. This patch moves the definition to ease review. No functional change. Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka --- mm/page_alloc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index af566e97a0f8..d45d00e069f9 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -676,6 +676,14 @@ static void bad_page(struct page *page, const char *reason) add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE); } +static inline void free_the_page(struct page *page, unsigned int order) +{ + if (order == 0) /* Via pcp? */ + free_unref_page(page); + else + __free_pages_ok(page, order, FPI_NONE); +} + /* * Higher-order pages are called "compound pages". They are structured thusly: * @@ -5331,14 +5339,6 @@ unsigned long get_zeroed_page(gfp_t gfp_mask) } EXPORT_SYMBOL(get_zeroed_page); -static inline void free_the_page(struct page *page, unsigned int order) -{ - if (order == 0) /* Via pcp? */ - free_unref_page(page); - else - __free_pages_ok(page, order, FPI_NONE); -} - /** * __free_pages - Free pages allocated with alloc_pages(). * @page: The page pointer returned from alloc_pages(). -- 2.26.2