Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp101519pxj; Thu, 3 Jun 2021 01:49:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAO0NjqLeN2IxAZXDlUhwOq62jx6+B4tCBVghDO61UPZqrNlxOgpjn2DUUgvL7TWjzXZkM X-Received: by 2002:a17:906:dc92:: with SMTP id cs18mr21208974ejc.327.1622710187185; Thu, 03 Jun 2021 01:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622710187; cv=none; d=google.com; s=arc-20160816; b=fGQ5griLwnx3sa2yU2904efpdUZ5WLVexy1zuf/UxUqDuyKpwKYml+n/jECiQ0P5TA t+hBOe/rfMn1zjxFamMhj29hp9JtAYYgHRbmruegL9enHo3Cr5o3/UMDO2XgXrz4H8wZ e8Kx5wwBy+HlPzeW9jCR48hH+SY2zoeS9EtAqRIdJmdlxw/BnLvOsX7ZRX/1hty/+2wQ ipZilY1Jip4mLAmO6a5DJJTSnGdA9TS1PzpLx4wPooEr4rshWkdl5WDC0/Zi6gVdRFJ3 WWiGnE1GJuYbY8ZK1FrMjtxCqj3C1TKkigWuteHjZGpJUeg+ypcvU0EGVLPOF8FD0N5P cNTQ== 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=ierLTljmifpYbmvpAIuFuF8jhReI7XMqnSeJ8ASQdi4=; b=ANLLeFZJg8bnveTwlpUplmnfZTfO5fkNX83g+cdSBsNxF5/hgY6SxFF07v9Ia8nD1o BAqcMRsVsV3DXSbQVzD+ZL65UjnAYOBUAHjiX0QRe5EtHoHNxB88n7bnhxBC3TC78OiR urKXW8BAAcHS/Kk+wHYmf8lohcK4B2bqSnPciX7t07F6dfDNQ4oeCeZ8g0hB59ZvCq9z UUD5msYQBKD1KjT86yFg3lOIv05tiMCS/Ydzai7q/BMRWOdAjN5LuooJVH84wV/iRNgn WKm3suNwZhFX4VUCLxk1O0/4vm+d/d+tsJNTvhbTrFSb0k48jYfM4p+BQZieXvOLBWuj D/2g== 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 bj9si1920393ejb.518.2021.06.03.01.49.23; Thu, 03 Jun 2021 01:49:47 -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 S229902AbhFCIs1 (ORCPT + 99 others); Thu, 3 Jun 2021 04:48:27 -0400 Received: from outbound-smtp46.blacknight.com ([46.22.136.58]:35673 "EHLO outbound-smtp46.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbhFCIs1 (ORCPT ); Thu, 3 Jun 2021 04:48:27 -0400 Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp46.blacknight.com (Postfix) with ESMTPS id 391DEFA9A3 for ; Thu, 3 Jun 2021 09:46:42 +0100 (IST) Received: (qmail 7969 invoked from network); 3 Jun 2021 08:46:41 -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 08:46:41 -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 09:46:20 +0100 Message-Id: <20210603084621.24109-2-mgorman@techsingularity.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210603084621.24109-1-mgorman@techsingularity.net> References: <20210603084621.24109-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 --- 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 4c468aa596aa..99ddac0ffece 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -687,6 +687,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: * @@ -5345,14 +5353,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