nvme-pci: flush initial scan_work for async probe
PATCH 1/1 nvme-pci: flush initial scan_work for async probe
From: Keith Busch <[email protected]>
The nvme device may have a namespace with the root partition, so make sure we've completed scanning before returning from the async probe.
Fixes eac3ef262941 ("nvme-pci: split the initial probe from the rest path")
Reported-by Klaus Jensen <[email protected]>
Tested-by Ville Syrjälä <[email protected]>
Signed-off-by Keith Busch <[email protected]>
--- drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/host/pci.c +1 -0
@@ -3046,6 +3046,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)nvme_start_ctrl (&dev->ctrl);nvme_put_ctrl (&dev->ctrl); +flush_work (&dev->ctrl.scan_work);return 0 ; out_disable:
Signature · 1 line
2.30.2
Quoted 28 lines · Keith Busch
From: Keith Busch <[email protected]>
The nvme device may have a namespace with the root partition, so make sure we've completed scanning before returning from the async probe.
Fixes eac3ef262941 ("nvme-pci: split the initial probe from the rest path")Reported-by Klaus Jensen <[email protected]>Tested-by Ville Syrjälä <[email protected]>Signed-off-by Keith Busch <[email protected]>--- drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+)drivers/nvme/host/pci.c +1
-0@@ -3046,6 +3046,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)nvme_start_ctrl (&dev->ctrl);nvme_put_ctrl (&dev->ctrl); +flush_work (&dev->ctrl.scan_work);return 0 ; out_disable:Signature · 1 line
2.30.2
Thanks Keith,
Tested-by Klaus Jensen <[email protected]>
Thanks,
applied to nvme-6.2.