Message ID | 20181205094247.6556-65-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 E20FC13AF for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 5 Dec 2018 09:46:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1BA92CC74 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 5 Dec 2018 09:46:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C45B62CCDA; Wed, 5 Dec 2018 09:46:52 +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 95C7C2CC74 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 5 Dec 2018 09:46:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B513A6B73AD; Wed, 5 Dec 2018 04:46:50 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AD79D6B73AE; Wed, 5 Dec 2018 04:46:50 -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 9795F6B73AF; Wed, 5 Dec 2018 04:46:50 -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 507886B73AD for <linux-mm@kvack.org>; Wed, 5 Dec 2018 04:46:50 -0500 (EST) Received: by mail-pg1-f197.google.com with SMTP id s22so10799565pgv.8 for <linux-mm@kvack.org>; Wed, 05 Dec 2018 01:46:50 -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=KU1a6mTZVdMOhI4v9gVe+2WEbqQWpKH0OguUeALqZPo=; b=EdWqn/7jfM6L0aiI4kfxadsLIGGdq3yWxBDIQeaBCvcL11LffZpOJZHcATyjKWphTk BvL/Jl8A/frASqy7hJ/JyyECaSqm3F2ILg/kUMj3t0ib9IBCSE//trgHRuGkfPZDWBl6 kdioQKpY5RbyS3+gX5A/DHywxQKty/7o7bTdWj8R/usHwRyI1j5vevFyLSasWaNdPp/q +O4oflPH34P8YeQjhrYuqxlTskoS7VJhjGs2m8u5d6iH3xbnFXBsMfPr1d5/BXipekn7 NDd0DMUFVxW79qTxyxMKmAh62y9TTvAQ43QDbLd1Uf+NeHJiGqxOGE1ClT/ZGBtKDeXo lHpw== X-Gm-Message-State: AA+aEWb9wGF+oTdcgZX5/UIGD+8u+cUZO1IlQM5etuEGLeI4crlU+UT+ wLwg8GjFMTrI3v2+hMINYuuEAQpRmglYoVX07ljhYIY7UadAY/saICGnb8XlkWnyXR7C/L8Gg9f rkylCZjZ2ffAp29B7eflq+T4yF3ribsu99myJy6uMqol4SuiXCnf/CJr67TSXaQXsnA== X-Received: by 2002:a62:7086:: with SMTP id l128mr23541795pfc.68.1544003209962; Wed, 05 Dec 2018 01:46:49 -0800 (PST) X-Google-Smtp-Source: AFSGD/XgouiZ1Q6eD5dIZ9SkTpVs1DGvlarQ+Ih+PBe+F0WAkjykKq0FJSCrxrpvDYTEimYvadd6 X-Received: by 2002:a62:7086:: with SMTP id l128mr23541756pfc.68.1544003208997; Wed, 05 Dec 2018 01:46:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544003208; cv=none; d=google.com; s=arc-20160816; b=mDlBW7Y2p8zZOhmeF8LDBWaCUNyvtAPdtICQ1vmUCDSaujg+S5xsALGl9gi/zlQ7Xo VNAvluoFEzBqFiMyR+L7HVqU1VKVpnIt7LODsa7Sgws7sML9n1Ikk5hVSzvfS8AdWBgZ l1ydwhS5otYhmF00mQ0gAARZ8IWnYr8HaNIdrrrrXeP9Fmzd3QiKbZPIth37vgO/a85q ErxAMFKEfbJZMK4ur7axVA7a07+WS6GGxeIoNVhwKbcKHyZprNPgEDHhdpm7537srFgO KeIYpZ/AcFzQN5l/UAZ1ri7CcwpLQoaPqzS6tVeRtckQS2TlNJEuP+2D2R3pWli0mJ26 tcew== 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=KU1a6mTZVdMOhI4v9gVe+2WEbqQWpKH0OguUeALqZPo=; b=Ubm6fvCa8k6FDG64lv0MOJVskhIR7CWUuqTlF4EK8KSmEV5NF/A7tO4+EZIdmrWb9s VVAqe+GDiaav2dL52saJ2ojvD5lNtDEY4261AXz6MgRnOZxHVg8Xsp6H2BRlGVHqXQl9 B+/pDHcknRCRn45O9nUnpKVppnMELjkIqO0pYV/XoQ/ZaCAw9v+geELvzHw80Kz9wCqC 1GUAxS49zMpYgY/tXHwGl6oUcBud3YA+g0modrFXF2F/hniwPmFr4vqiy0dy6OR6s2sW jmayqAbW3G0HRwMsqfQcO/FL6Oi76i17dC7ERhCdG6lcpBGOrrAMTl6mlSYgKDTgKjAs 1+Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bUEDsJjL; 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 q8si18188276pgc.580.2018.12.05.01.46.48 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 01:46:48 -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=bUEDsJjL; 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 6459C20878; Wed, 5 Dec 2018 09:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544003208; bh=MytifBFqhD8qxDtP+VB5UAGzmhyxcO+ZcXBnjD/NR6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bUEDsJjLGCvVUPgKI+9Alqb2pLXb2OecXjKMmhhE305o1cQBV0qSIP9VR4KohSwKB Lp7M8OgsYpVgws7MXmr7MLauG22VqbHPkY1kHtpeaL6whjpBPjPSTB1BuUb2PUS4F+ 7aCNk6Jr7h6RHewHqnTbzDFi4i2+/OLaANxnBKKQ= 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.14 65/69] mm/page_alloc.c: fix calculation of pgdat->nr_zones Date: Wed, 5 Dec 2018 04:42:43 -0500 Message-Id: <20181205094247.6556-65-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181205094247.6556-1-sashal@kernel.org> References: <20181205094247.6556-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 2074f424dabf..86a5cab8b5dc 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5554,8 +5554,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;