[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191121151811.49742-14-fly@kernel.page>
Date: Thu, 21 Nov 2019 23:18:05 +0800
From: Pengfei Li <fly@...nel.page>
To: akpm@...ux-foundation.org
Cc: mgorman@...hsingularity.net, mhocko@...nel.org, vbabka@...e.cz,
cl@...ux.com, iamjoonsoo.kim@....com, guro@...com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Pengfei Li <fly@...nel.page>
Subject: [RFC v1 13/19] mm, page_alloc: use first_node in local_memory_node()
In local_memory_node(), we want to access first node instead of
first zone, so use first_node_nlist instead of first_zone_nlist.
Signed-off-by: Pengfei Li <fly@...nel.page>
---
mm/page_alloc.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index aa5c2ef4f8ec..5c96d1ecd643 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5673,12 +5673,8 @@ static void build_zonelists(pg_data_t *pgdat)
*/
int local_memory_node(int node)
{
- struct zone *zone;
-
- zone = first_zone_nlist_nodemask(node_nodelist(node, GFP_KERNEL),
- gfp_zone(GFP_KERNEL),
- NULL);
- return zone_to_nid(zone);
+ return first_node_nlist_nodemask(node_nodelist(node, GFP_KERNEL),
+ gfp_zone(GFP_KERNEL), NULL);
}
#endif
--
2.23.0
Powered by blists - more mailing lists