From patchwork Fri May 20 07:37:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Liu X-Patchwork-Id: 12856410 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8704C4332F for ; Fri, 20 May 2022 07:23:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346111AbiETHXC (ORCPT ); Fri, 20 May 2022 03:23:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241014AbiETHXB (ORCPT ); Fri, 20 May 2022 03:23:01 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAB5D14ACB8; Fri, 20 May 2022 00:22:58 -0700 (PDT) Received: from kwepemi100019.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4L4J7w24STzhXbB; Fri, 20 May 2022 15:22:04 +0800 (CST) Received: from kwepemm600017.china.huawei.com (7.193.23.234) by kwepemi100019.china.huawei.com (7.221.188.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 20 May 2022 15:22:56 +0800 Received: from localhost.localdomain (10.175.112.125) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 20 May 2022 15:22:54 +0800 From: Peng Liu To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v2 0/2] null_blk: fix wrong use of nr_online_nodes Date: Fri, 20 May 2022 07:37:45 +0000 Message-ID: <20220520073747.1184091-1-liupeng256@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600017.china.huawei.com (7.193.23.234) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Helper node_available() is introduced to judge whether a node can be used, and it is used to fix the wrong use of nr_online_nodes when numa node is sparse. v1->v2: Modify comments as suggested by Bjorn Helgaas. Peng Liu (2): numa: create node_available() helper null_blk: fix wrong use of nr_online_nodes arch/ia64/hp/common/sba_iommu.c | 2 +- arch/x86/pci/acpi.c | 2 +- drivers/acpi/arm64/iort.c | 2 +- drivers/block/null_blk/main.c | 45 ++++++++++++++++++++------------- drivers/pci/pci-sysfs.c | 2 +- include/linux/nodemask.h | 3 +++ mm/mempolicy.c | 2 +- 7 files changed, 36 insertions(+), 22 deletions(-)