mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
nvme-pci: detach dma-bufs only on removal
Detaching the dma-bufs on every shutdown permanently prevents dma-buf
I/O after resuming from a suspend. The mappings remain valid across
suspend, so detach these only when the device is being removed.
Fixes: ce5e386c11 ("nvme-pci: implement dma-buf backed requests")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Link: https://patch.msgid.link/20261021184658.644645-3-kbusch@meta.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
bcbd808652
commit
fd13f31ac6
|
|
@ -3578,9 +3578,6 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
|
|||
nvme_unquiesce_admin_queue(&dev->ctrl);
|
||||
}
|
||||
mutex_unlock(&dev->shutdown_lock);
|
||||
|
||||
if (shutdown)
|
||||
nvme_pci_remove_dmabuf(&dev->dmabufs);
|
||||
}
|
||||
|
||||
static int nvme_disable_prepare_reset(struct nvme_dev *dev, bool shutdown)
|
||||
|
|
@ -4150,6 +4147,7 @@ static void nvme_remove(struct pci_dev *pdev)
|
|||
nvme_stop_ctrl(&dev->ctrl);
|
||||
nvme_remove_namespaces(&dev->ctrl);
|
||||
nvme_dev_disable(dev, true);
|
||||
nvme_pci_remove_dmabuf(&dev->dmabufs);
|
||||
nvme_free_host_mem(dev);
|
||||
nvme_dev_remove_admin(dev);
|
||||
nvme_dbbuf_dma_free(dev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user