Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3373087ybc; Thu, 21 Nov 2019 07:25:06 -0800 (PST) X-Google-Smtp-Source: APXvYqxi/Nn7rYvrUBkmUqwm1GmVFy44dDsBJdVPtHLlUsDLDj7z+yE86HWE0aIfS9XsrvLoKUVF X-Received: by 2002:a17:906:53c7:: with SMTP id p7mr14542931ejo.88.1574349906339; Thu, 21 Nov 2019 07:25:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574349906; cv=none; d=google.com; s=arc-20160816; b=xdO6afWhBaFcOVWhK+/QvJOSHjZqbPWJ7BCEAPgk0auFpSYWQDvdUZByJ1hSBWw0Q1 fCO7Pg18Nep+dN1cj0RtJO8D7bvXPOu9GHwQ82cAwog01en+Kysn07hy2G7J1urmqshP K7jgxXMAHMbXhc0GIZL8YhCnRbELhlSjGqiTLNUAf9QgfVz/yEyC0aHCKtWPbxVhgL3A vj/fQnfVWG+Pcd7+ucvyMEIq8MnszfU8LZb2V+PcYXrXnNEi91swbuguLcOirScIoCIk w2zHhCYxXjWFjvoLWfUWIdLMSr3Rj/rWPZ75yrXESUZ5u2fyu3w7lIqeanxCfkSpesFo /L/g== 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=ZtxSvWyEvDtrJqwIqoBrYECxcoUu35ko59+1j5CQsiY=; b=W9p2NVYeFjg2M3gHHVaKzkrxwlGA4l7oEezey/ve2KR2zJWYo9xTpYAPZiRmZq9Dnt Wz+sro92hnUhRHuZVqKXj9vVxcJyPH4a2AMLcvfHScC8kg5BmZ/g4mN0HzMc32cFFpLH P488jeq3U7RPnbtH70aIKvW4VrQ9H+uiwhcYjljXALGz6UqRMW3hQ51XIo7I2lQ/t8Mf ixVH/B939zPSgK1DRoNxW/W/B84524FRIWd+AOObOTgsIJKLNd+RGSEVI+0QsV1iBXbh /CbtbpgJ2uAQVpPVlTfQp54CmhtwUTHLCou5GIR0/y4tc2r+Kkm0rkg3ww/y5PMBDv/1 LsGQ== 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 t12si2059391ejr.6.2019.11.21.07.24.42; Thu, 21 Nov 2019 07:25:06 -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 S1727377AbfKUPWd (ORCPT + 99 others); Thu, 21 Nov 2019 10:22:33 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:37755 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726881AbfKUPWc (ORCPT ); Thu, 21 Nov 2019 10:22:32 -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 2425C1C001C; Thu, 21 Nov 2019 15:22:24 +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 17/19] mm, memory_hotplug: cleanup online_pages() Date: Thu, 21 Nov 2019 23:18:09 +0800 Message-Id: <20191121151811.49742-18-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 This is a cleanup patch. In online_pages(), rename the local variable need_zonelists_rebuild to need_nodelists_rebuild. Signed-off-by: Pengfei Li --- mm/memory_hotplug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 3c63529df112..3ff55da7b225 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -760,10 +760,10 @@ struct zone * zone_for_pfn_range(int online_type, int nid, unsigned start_pfn, int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_type) { - unsigned long flags; + bool need_nodelists_rebuild = false; unsigned long onlined_pages = 0; + unsigned long flags; struct zone *zone; - int need_zonelists_rebuild = 0; int nid; int ret; struct memory_notify arg; @@ -798,7 +798,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ * So, zonelist must be updated after online. */ if (!populated_zone(zone)) { - need_zonelists_rebuild = 1; + need_nodelists_rebuild = true; setup_zone_pageset(zone); } @@ -806,7 +806,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ online_pages_range); if (ret) { /* not a single memory resource was applicable */ - if (need_zonelists_rebuild) + if (need_nodelists_rebuild) zone_pcp_reset(zone); goto failed_addition; } @@ -820,7 +820,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ shuffle_zone(zone); node_states_set_node(nid, &arg); - if (need_zonelists_rebuild) + if (need_nodelists_rebuild) build_all_nodelists(NULL); else zone_pcp_update(zone); -- 2.23.0