Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3371577ybc; Thu, 21 Nov 2019 07:23:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyko6YaDOAf3QRIFXRBo8U/RGQrrTqG+7ClXUjahjwZp3/NtodHkywfhakNHYHfZFDcmTHh X-Received: by 2002:a17:906:8548:: with SMTP id h8mr14477028ejy.290.1574349836576; Thu, 21 Nov 2019 07:23:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574349836; cv=none; d=google.com; s=arc-20160816; b=cfIrg9ipr5nCXEsYzp6aqWD+8dXG7r6922otLB3K3hHqvW1U+qfNe6Jp8TtzHuVk5r s5QhO+7RFwYT0HuapEgnXzxgYrY8q26HgTFUdShDoLkL8RrnyxBHxyk6VRa/R/kgbDFy WVmZBouxNUKV709+q/WXvBWmac7gsYFDekV06sgwz35YGqxXg+iRCNPslPDs09xY7EHr 2fdGG29WduLwapX3OJQmJozID4Z6XCBSKpn53bd6n6hMdGFJ4N57gQF8uNfJn5xvNNi7 KumjG/PcHatPovxtmCisbQQqblhFxBu3Y8LeDop+RoFNxVrSO9A075NseP18QsS+jb3g rsNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=f5wRoxhq5jPAnPN4PLxUdcssJ6jsvOBOe1lTPa9viZw=; b=mtE+qvp+isq/JdjrktC4LaqiSSHlbJWVy8/GdIXfnGnMnezt1EQ6kuPyz+DCI23/RL mdf+UT5NLsIInZ0nhCvCkNmlYlyXgdfw/ddf73c0sgmy3oVXg58kq4dK5/Qgsb75Aege 68ic4s2PGtPSYSAz82EM2j9NlaKCPotuwklxDk/N7Ci2jEblkhJOuELCvsEARJZOMKoc ajUhMucGp2eMIv57RNsocmCoecMlKsZ7cq5Vy2npOQTABAsilfnYTPhh+jBDK56p34xl geMSavKeTsQ7Z6ElkqUN2zg6yZsNYFJg8/xN9wIml8IgDdIvCJGga/etKYCxKh/0Yc2/ GuhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o22si2029770ejr.78.2019.11.21.07.23.32; Thu, 21 Nov 2019 07:23:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727297AbfKUPVs (ORCPT + 99 others); Thu, 21 Nov 2019 10:21:48 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:40151 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbfKUPVs (ORCPT ); Thu, 21 Nov 2019 10:21:48 -0500 X-Originating-IP: 153.3.140.100 Received: from localhost.localdomain.localdomain (unknown [153.3.140.100]) (Authenticated sender: fly@kernel.page) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 9F5D81C0006; Thu, 21 Nov 2019 15:21:34 +0000 (UTC) From: Pengfei Li To: akpm@linux-foundation.org Cc: mgorman@techsingularity.net, mhocko@kernel.org, vbabka@suse.cz, cl@linux.com, iamjoonsoo.kim@lge.com, guro@fb.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Pengfei Li Subject: [RFC v1 13/19] mm, page_alloc: use first_node in local_memory_node() Date: Thu, 21 Nov 2019 23:18:05 +0800 Message-Id: <20191121151811.49742-14-fly@kernel.page> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191121151811.49742-1-fly@kernel.page> References: <20191121151811.49742-1-fly@kernel.page> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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