1
0
Fork 0

nvmet: don't try to add ns to p2p map unless it actually uses it

Even without CONFIG_P2PDMA this results in a error print:
nvmet: no peer-to-peer memory is available that's supported by rxe0 and /dev/nullb0

Fixes: c6925093d0 ("nvmet: Optionally use PCI P2P memory")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
hifive-unleashed-5.1
Sagi Grimberg 2018-11-02 16:12:21 -07:00 committed by Jens Axboe
parent bb39ba6a8d
commit 21d3bbdd4c
1 changed files with 1 additions and 1 deletions

View File

@ -420,7 +420,7 @@ static void nvmet_p2pmem_ns_add_p2p(struct nvmet_ctrl *ctrl,
struct pci_dev *p2p_dev;
int ret;
if (!ctrl->p2p_client)
if (!ctrl->p2p_client || !ns->use_p2pmem)
return;
if (ns->p2p_dev) {