]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nvme-pci: do not set the NUMA node of device if it has none
authorPratyush Yadav <ptyadav@amazon.de>
Tue, 12 Sep 2023 15:52:49 +0000 (17:52 +0200)
committerKeith Busch <kbusch@kernel.org>
Tue, 12 Sep 2023 16:06:58 +0000 (09:06 -0700)
If a device has no NUMA node information associated with it, the driver
puts the device in node first_memory_node (say node 0). Not having a
NUMA node and being associated with node 0 are completely different
things and it makes little sense to mix the two.

Signed-off-by: Pratyush Yadav <ptyadav@amazon.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c

index baf69af7ea78efd27e57c1c2cfe763ff17867c4e..f5ba2d7102eae10ba672b6e07f023e2a2a01e094 100644 (file)
@@ -2916,9 +2916,6 @@ static struct nvme_dev *nvme_pci_alloc_dev(struct pci_dev *pdev,
        struct nvme_dev *dev;
        int ret = -ENOMEM;
 
-       if (node == NUMA_NO_NODE)
-               set_dev_node(&pdev->dev, first_memory_node);
-
        dev = kzalloc_node(sizeof(*dev), GFP_KERNEL, node);
        if (!dev)
                return ERR_PTR(-ENOMEM);