Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2974216ybp; Sun, 6 Oct 2019 01:58:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGaudtcVBhn/JfNy+BLbJYbhkah8xgK+BVM+SLbICHV+GeFECpINpXn/xpdKHLfQ86DhcL X-Received: by 2002:a05:6402:b13:: with SMTP id bm19mr689541edb.152.1570352299061; Sun, 06 Oct 2019 01:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570352299; cv=none; d=google.com; s=arc-20160816; b=QljSAY8q2wR/zXKz8a5dY+DIoYIGVGMGJuEfqtaypvv79eyx7jAlAIZA7M+Qc9HQ/G k6lgchM9Qx7bhsu4+hMjmCwWwNmXBdPFIavP4Qa/d+Gl04ORD4VmZY6JBuNdBu08zt19 JHVicoMEZxE1bTcm2bZxlAPxvB+nhQl8hb39CPZ/I597mJsShPgMJ2LpyQZ7J4gLK6R8 x8BwyJPNWmMp0g1aHOqp+8UeZA/povN6ihOFmBOi9WXK0vszOZI7NcD2h8dRvZKUUL5+ b0qfmV9gKKC1P+MmnsB+t3KfJpwMluZozsg6Z/hqayb9g/k1RVJvo06j0pgecD6M2tcs ayww== 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=f6jL3f7E9uRKgOm6ox3GOQxaegWLTKba9IwM00WOXbQ=; b=wz5wmrImoLlxazIQpmaXMgfRX9BD7ASPYF6qIo27ASWg/VaUR37bPXEGXdcFCAcAtw NPc/rtlqY/BNlspxqL0kmAvdm7T7uOq/BVKWMwfOVZF1Lo+4N8CkFbfOmFyrpOJAQBbv Z4xW2AgWqU2idK37yPsn7eKDkNz5+8VZ1hW6/3LXcTEzRXQBE0eGCdbi5/WLkLBDOTs2 d++p1zRvk1dd26myPfmRwVP4pZ5thzppLD/u+/yTNtC82hWgWBpGI7xlO2hCj9N/mUb0 o1YhRumdgKRJwOi3z8cJfjU8Ma5JRMp/49fSMY3RVvK+zkHNL412AMzfqni1vPGxwfKP 9yJw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si6879339edd.390.2019.10.06.01.57.55; Sun, 06 Oct 2019 01:58:19 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726473AbfJFI5h (ORCPT + 99 others); Sun, 6 Oct 2019 04:57:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49174 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfJFI5g (ORCPT ); Sun, 6 Oct 2019 04:57:36 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 12B75307D853; Sun, 6 Oct 2019 08:57:36 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-58.ams2.redhat.com [10.36.116.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 488265B681; Sun, 6 Oct 2019 08:57:33 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, x86@kernel.org, David Hildenbrand , Andrew Morton , Oscar Salvador , Michal Hocko , Pavel Tatashin , Dan Williams , Wei Yang Subject: [PATCH v6 07/10] mm/memory_hotplug: We always have a zone in find_(smallest|biggest)_section_pfn Date: Sun, 6 Oct 2019 10:56:43 +0200 Message-Id: <20191006085646.5768-8-david@redhat.com> In-Reply-To: <20191006085646.5768-1-david@redhat.com> References: <20191006085646.5768-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Sun, 06 Oct 2019 08:57:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With shrink_pgdat_span() out of the way, we now always have a valid zone. Cc: Andrew Morton Cc: Oscar Salvador Cc: David Hildenbrand Cc: Michal Hocko Cc: Pavel Tatashin Cc: Dan Williams Cc: Wei Yang Signed-off-by: David Hildenbrand --- mm/memory_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index bf5173e7913d..f294918f7211 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -337,7 +337,7 @@ static unsigned long find_smallest_section_pfn(int nid, struct zone *zone, if (unlikely(pfn_to_nid(start_pfn) != nid)) continue; - if (zone && zone != page_zone(pfn_to_page(start_pfn))) + if (zone != page_zone(pfn_to_page(start_pfn))) continue; return start_pfn; @@ -362,7 +362,7 @@ static unsigned long find_biggest_section_pfn(int nid, struct zone *zone, if (unlikely(pfn_to_nid(pfn) != nid)) continue; - if (zone && zone != page_zone(pfn_to_page(pfn))) + if (zone != page_zone(pfn_to_page(pfn))) continue; return pfn; -- 2.21.0