Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1659784ioo; Sun, 22 May 2022 23:23:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxD7TKR10utwW+6YnSjYejYnqzZqoi/gI6fak3QNm6WDQMxYSP+8fUTZBJtSXnRyWq5xtWH X-Received: by 2002:aa7:8432:0:b0:518:98a7:dbf9 with SMTP id q18-20020aa78432000000b0051898a7dbf9mr5214996pfn.28.1653286988207; Sun, 22 May 2022 23:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653286988; cv=none; d=google.com; s=arc-20160816; b=cq2GGojlyhK182mxdrXUpDa6V/RopKDQWTYrNCKruWBJv8osntOJIUae4xCP0cigQ/ VJSlBVojXT+nuKmy0lZvNTzEOqtU4Yl4GTikF7JYpAP5ubMIMN1rkqLRgr0S4991DT25 SGzYjA7oC8Cqe95lbH6ZcVokche5hAze7hPKRMTLZ5P/5ZT6atU5YCOCIXKsmuXHH4cQ OGw8OMKSSUV2JS7j4vKa5L24slCgg5Bt7fZMfcfUZZwX091IBTOWUzxhSpkA+3bCkFRi umUSS5iOfKwcQ9sZsjqYHsTihD02IQOBj0AcvL01meTKxRpDZ65zERkTayNyc06PCEl+ KUrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=h2w3vh1cYk1PjKsWo1nrNxGV3Sb/TUPM2rjcaDZ6uu4=; b=cl0gv788RvrVMDbScTc0m0qmjAQetEIDuRatj+PD5QwoW480PtGD9m1fLNuN/GnlD5 +zofl3eRC+fuof18ElaRreu4E0x5v/p3wzVlcsBUwnND0XuObv/UFLgc0g5eu9Bih0Ez nAGeEKy3NATO5YReSrZY4x9ZvutzZ0VpoehIoAB5LSI3qaQJTO5dT1Et86k9yKjoHufc HafmQSG9uovS8HCkThcfRKgngJRSMTssfeieVGwLTxGv+MpUwJhpYJQW1dX1hRBhHegr 953zI5FdstnrnALzg5qIo2WQJRww+2G0Tv7tUDvPwaRhO9tdBUFgXC+m6lqu7VOV08cc n25Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e15-20020a17090301cf00b00161c545c5c3si10500118plh.601.2022.05.22.23.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:23:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C103726550; Sun, 22 May 2022 23:05:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346362AbiETHXE (ORCPT + 99 others); Fri, 20 May 2022 03:23:04 -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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) -- 2.25.1