From: Christoph Hellwig Date: Fri, 6 Nov 2020 18:19:35 +0000 (+0100) Subject: nvme-rdma: Use ibdev_to_node instead of dereferencing ->dma_device X-Git-Tag: v5.10.19~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95c0528c11b234c6292448f6d2963fc5979ca9be;p=thirdparty%2Fkernel%2Fstable.git nvme-rdma: Use ibdev_to_node instead of dereferencing ->dma_device commit 22dd4c707673129ed17e803b4bf68a567b2731db upstream. ->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 Signed-off-by: Jason Gunthorpe Cc: Krishnamraju Eraparaju Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 493ed7ba86ed2..4eb867804b6ab 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -860,7 +860,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 &