Skip to content

Commit

Permalink
nvme-pci: do not set the NUMA node of device if it has none
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
  • Loading branch information
prati0100 authored and keithbusch committed Sep 12, 2023
1 parent 8ae5b3a commit dad651b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dad651b

Please sign in to comment.