Message ID | 20181205093555.5386-116-sashal@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 284E213AF for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 5 Dec 2018 09:42:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 145952CC67 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 5 Dec 2018 09:42:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0410E2CC74; Wed, 5 Dec 2018 09:42:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79F002CC67 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 5 Dec 2018 09:42:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 932A86B73A6; Wed, 5 Dec 2018 04:42:14 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8DE9E6B73A7; Wed, 5 Dec 2018 04:42:14 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7CD936B73A8; Wed, 5 Dec 2018 04:42:14 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by kanga.kvack.org (Postfix) with ESMTP id 3B95B6B73A6 for <linux-mm@kvack.org>; Wed, 5 Dec 2018 04:42:14 -0500 (EST) Received: by mail-pg1-f197.google.com with SMTP id r16so10826422pgr.15 for <linux-mm@kvack.org>; Wed, 05 Dec 2018 01:42:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=3mE1lO7gXT9uqHfvfpujrlxpBnkzIbqGEXUm9F8m4fQ=; b=nrBwzZ2+E+X8G3zlT/gJ6fV0nR9QMJ/HxKeti6Iq82ycOqk0qoyYKnV77MncKzb+xm 3bWn0f7eMHlCzMGkuFoN2nGNbDnPFZS9HRTGshwLNm6Fy1evKoymMTznEi1kk1AuIgPZ 2ewmvFjaYnPThiF6EFy2Fdq8Y1TzHqtZ2lTlM5IxQTR1PQxudo/PhmopmyQTXcPeaheI xcut5lYZUtNqdOfBnfJAkjT6Xe1GaFh6JldluOzFlQErn715LicpTTU7JloojY5qkOJS bPBf/fB5VxmUTpq8VStukUUi7qUZIkgqCrKuzkfefogIp5/+dy78sooUQzetxQ/Ue3+o Y8YA== X-Gm-Message-State: AA+aEWY1OY1iQR4VHmpqHsZtcwX/YfGuA83m2vmSzYbSaCg1qQMVVOiV gHuuaqB8Y2WhOyqYhjPCLuZdU9q3AO8bsEovtxaWe2Tvfw2Gnf50IGO/5lY7AlxVotsR9ktt5L2 7Q6wyRw0J4JPD1gwIicDOj0E2U9xGDJoL4r8g0JGgVHx3NdxBw8X0YRCA2u5MkAZw7g== X-Received: by 2002:a17:902:583:: with SMTP id f3mr24193988plf.202.1544002933891; Wed, 05 Dec 2018 01:42:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/U/p0nKnIRIwnIpLx7/7oMypyH6v2xX8dh7sLIWn6zSAnuYZNCuGU3KCXTQh4UCu1cXBRwJ X-Received: by 2002:a17:902:583:: with SMTP id f3mr24193959plf.202.1544002933195; Wed, 05 Dec 2018 01:42:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544002933; cv=none; d=google.com; s=arc-20160816; b=f4kgNPPjSdGQoS7ius20mV8HZ5+eIgrQNcWMoeua+eBIhWNJqzUmeQZuSxZw5kjrMl wfiyT79LEVrvqjB/4j0N9GgK4T3VZ04AX+CfXwPIYaSmQAZZnj/P6Zcb6oe4G/8A2jCL vJaSxizKbg5dmAW1axBbguCYaTtu7h0Xnzgh1pTVR4hgmMVRWFctuyw8XF+Me4JcX+EV A46yvlnYheh20+ZP6N0dcGRLsqTA+DVBUzhpKfG4svetUL2TtU/KDK7oiBizNs9zthFy r/j+Q0PRc1aJS6S3g9jo8UQGV3FN0Pil26h5+LBoJ73FpteyGGq0fcbu2BwuarJ6XNnC +95Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3mE1lO7gXT9uqHfvfpujrlxpBnkzIbqGEXUm9F8m4fQ=; b=XfQePcIDv4jUlQprzhzQ/UOLJxwRh4RF2AS9crNGQi5gveGT6bEA0NqSevQ5JwJET4 Deq1S/o263C64esz/AwDHuyowPuNXH4o1R2ZkSozsfvFcEkgKWd55s4aKdVWZKKHAczG zhMNRFwTncWqNYr/gkP316rZIA55kIRNgHiCWGPCAPnPbQoddR0OCShcQkUig2ST+ytC Av0tT9yup2URkljj9gGR8AaPPQmQ3GbXNZaZQJc+n2b6IT/1o3DniYoNpXBKkl9CDTIl DLENSmJHuFRtaWr2NC/UB4RgSSVFvKqrri+GxDRdGXtpsucpuMKO0+SXG3jDgDApBY70 glDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tJrnbcHP; spf=pass (google.com: domain of sashal@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=sashal@kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id o14si17373357pgj.59.2018.12.05.01.42.13 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 01:42:13 -0800 (PST) Received-SPF: pass (google.com: domain of sashal@kernel.org designates 198.145.29.99 as permitted sender) client-ip=198.145.29.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tJrnbcHP; spf=pass (google.com: domain of sashal@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=sashal@kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sasha-vm.mshome.net (unknown [213.57.143.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8DE7120850; Wed, 5 Dec 2018 09:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544002932; bh=kIwkgi4Z7ZH3fPU+burNiqE1zH3LziBbQtYZlRe44XQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tJrnbcHPVh5PhLr+GA2B2tF7dY6a2eKAYPJxAD+6U+HluufZXc7lbCYo9i5jNSzFZ 2OUEsxrtJJYRS7TqBkZlDhEoezUPOgg23qQw3FAlfp/bsOymrsQiVIJU91tQ2RMPT1 nnwG/lTQy8eNIMY5xF8BNwU8kQNLmT7gTEKpfQuw= From: Sasha Levin <sashal@kernel.org> To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Wei Yang <richard.weiyang@gmail.com>, Anshuman Khandual <anshuman.khandual@arm.com>, Dave Hansen <dave.hansen@intel.com>, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, Sasha Levin <sashal@kernel.org>, linux-mm@kvack.org Subject: [PATCH AUTOSEL 4.19 116/123] mm/page_alloc.c: fix calculation of pgdat->nr_zones Date: Wed, 5 Dec 2018 04:35:48 -0500 Message-Id: <20181205093555.5386-116-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181205093555.5386-1-sashal@kernel.org> References: <20181205093555.5386-1-sashal@kernel.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
None
|
expand
|
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index b721631d78ab..6a62b2421cdf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5733,8 +5733,10 @@ void __meminit init_currently_empty_zone(struct zone *zone, unsigned long size) { struct pglist_data *pgdat = zone->zone_pgdat; + int zone_idx = zone_idx(zone) + 1; - pgdat->nr_zones = zone_idx(zone) + 1; + if (zone_idx > pgdat->nr_zones) + pgdat->nr_zones = zone_idx; zone->zone_start_pfn = zone_start_pfn;