summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-11-06 19:19:35 +0100
committerJason Gunthorpe <jgg@nvidia.com>2020-11-12 18:33:44 +0100
commit22dd4c707673129ed17e803b4bf68a567b2731db (patch)
treed92e38bbbfd4914a1c1f2377b3a999214c115a43 /drivers/nvme
parentRDMA: Lift ibdev_to_node from rds to common code (diff)
downloadlinux-22dd4c707673129ed17e803b4bf68a567b2731db.tar.xz
linux-22dd4c707673129ed17e803b4bf68a567b2731db.zip
nvme-rdma: Use ibdev_to_node instead of dereferencing ->dma_device
->dma_device is a private implementation detail of the RDMA core. Use the ibdev_to_node helper to get the NUMA node for a ib_device instead of poking into ->dma_device. Link: https://lore.kernel.org/r/20201106181941.1878556-5-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/rdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index aad829a2b50d..9a6957b4b700 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -854,7 +854,7 @@ static int nvme_rdma_configure_admin_queue(struct nvme_rdma_ctrl *ctrl,
return error;
ctrl->device = ctrl->queues[0].device;
- ctrl->ctrl.numa_node = dev_to_node(ctrl->device->dev->dma_device);
+ ctrl->ctrl.numa_node = ibdev_to_node(ctrl->device->dev);
/* T10-PI support */
if (ctrl->device->dev->attrs.device_cap_flags &