Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp524924imm; Fri, 17 Aug 2018 02:02:17 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyFBTF1i9w5okH5Gh4/H0ZVVI76qUwRzb57wNW8tSrsn27HaneC3qv9o4X4zVMdn7FIClsh X-Received: by 2002:a17:902:14e:: with SMTP id 72-v6mr32502210plb.299.1534496537815; Fri, 17 Aug 2018 02:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534496537; cv=none; d=google.com; s=arc-20160816; b=gTU6pEB928+EqHpmtzgPEjH/BNK1rMbxazuy1iUuNK3zxvOAoA/n7QssUfYDrf6xlK OfouxEYSzD0sc0YxX6cWzXNU00QT4SZ87OUi5Fj+GunFsli6FYywfFLzSj/kHn7Zy3t2 RARZLtV5ZJxbrOFPMqFpOuL5ZRqA6UUKZbQSCFmltoXZkoLLe1TvOxBDCgv8eSQObTaE PXShoDYNOf28jdS4QeYUe0U4VxZVUwW2IuoBXw8A0On/QMdxqZOfRsOjVyATpR5ksXUt I1ceMSKOP7wXLvMu/ovjpZp4jmB1dKA9jh2udErYGEi+8g8hq5l2lz9SJNfxYoEh+JV1 70og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=MfeLkrMnDV4y5R6Q7/PqTxz8z6E5Vlfpzpm0flHpXQo=; b=Wg5l/9R2ezAykuecFVm6FZg/RMs9cpaQZf/WhQrq6aGQtnTX+/MF+4lyLZiFkt/kAv TwnjzBfUJerQiXR1WyQjDbgx1l+UccaD1xW3RGYPXnXA/WTUk+RMRJA4PVqRUSpqnGlp aMOexW12KHLPo2+Oxd2671pnEDJWgso/MoW7/KCAxSqdppGiaS6UGOqgjzj2nzAXst+s GoW6ndU2Ar9NrMlbbJRiUJjXriwixVTVCR4HU4CpYLTZ0PdCQezHnjAJMZOfjYZIKOW9 FuQqb2VhW0fIqj0w4tMeLqpcUjgn2u03VKZuhnmtV2Y78VUZWZUS8bgWJ0tHxxH8ysqn 2eJw== 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 x4-v6si1567272pgr.167.2018.08.17.02.02.02; Fri, 17 Aug 2018 02:02:17 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726730AbeHQMDM (ORCPT + 99 others); Fri, 17 Aug 2018 08:03:12 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:51840 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbeHQMDA (ORCPT ); Fri, 17 Aug 2018 08:03:00 -0400 Received: by mail-wm0-f68.google.com with SMTP id y2-v6so6915668wma.1 for ; Fri, 17 Aug 2018 02:00:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MfeLkrMnDV4y5R6Q7/PqTxz8z6E5Vlfpzpm0flHpXQo=; b=jSLJUXd0z9euIzBwGPYU1yyuf5cv4mge7SoEr9aKqSxkoyGukxD7E5PoeqMSwRL7VN CbeG8ZG2N/Ca0bnNNBBD2AE8wKmgtzqe2qVjiMBQWXp+XlBb2suHk8TPPqTxSuvHCwlQ 1/WUH3VA4U0+566VzjklXDwj9yzSwVthZh28Q8fU/o5b1MdeUuGn9gwihWTN+H+M0xBG oW9WynZjDmIY5yvA9N/ePbkQRHcwNDIMqUTyzLd8+QG8sA1f1XfAlp26uC717iiZ9Dbx JLFPQNfBnew+pAh+ePHbhPoh7kjqrLsyubs6X3H0tyWPYnBH/RY6oXREvcFgMKMVSGZD vKlQ== X-Gm-Message-State: AOUpUlGNcDe3/llyxrOCBbiZiKmejXFWKrEqGpmlyou3IrXEPWKSZa/4 +1q9AsRDJ8oN6JwnTl3sECk= X-Received: by 2002:a1c:f60c:: with SMTP id w12-v6mr17479406wmc.80.1534496424377; Fri, 17 Aug 2018 02:00:24 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id f23-v6sm2105975wmc.42.2018.08.17.02.00.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Aug 2018 02:00:23 -0700 (PDT) Received: from d104.suse.de (nat.nue.novell.com [195.135.221.2]) by techadventures.net (Postfix) with ESMTPA id B4EE6124938; Fri, 17 Aug 2018 11:00:21 +0200 (CEST) From: Oscar Salvador To: akpm@linux-foundation.org Cc: mhocko@suse.com, vbabka@suse.cz, dan.j.williams@intel.com, yasu.isimatu@gmail.com, jonathan.cameron@huawei.com, david@redhat.com, Pavel.Tatashin@microsoft.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oscar Salvador Subject: [PATCH v4 4/4] mm/memory_hotplug: Drop node_online check in unregister_mem_sect_under_nodes Date: Fri, 17 Aug 2018 11:00:17 +0200 Message-Id: <20180817090017.17610-5-osalvador@techadventures.net> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180817090017.17610-1-osalvador@techadventures.net> References: <20180817090017.17610-1-osalvador@techadventures.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oscar Salvador We are getting the nid from the pages that are not yet removed, but a node can only be offline when its memory/cpu's have been removed. Therefore, we know that the node is still online. Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Reviewed-by: Pavel Tatashin --- drivers/base/node.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index 6b8c9b4537c9..01e9190be010 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -464,8 +464,6 @@ void unregister_mem_sect_under_nodes(struct memory_block *mem_blk, if (nid < 0) continue; - if (!node_online(nid)) - continue; if (node_test_and_set(nid, unlinked_nodes)) continue; -- 2.13.6