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
[ Upstream commit dad651b ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
prati0100 authored and gregkh committed Oct 6, 2023
1 parent 6b2165c commit a60768c
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 @@ -3115,9 +3115,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 NULL;
Expand Down

0 comments on commit a60768c

Please sign in to comment.