Skip to content

Commit 5a5754a

Browse files
keithbuschChristoph Hellwig
authored andcommitted
nvme-pci: flush initial scan_work for async probe
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: eac3ef2 ("nvme-pci: split the initial probe from the rest path") Reported-by: Klaus Jensen <[email protected]> Signed-off-by: Keith Busch <[email protected]> Tested-by: Ville Syrjälä <[email protected]> Tested-by: Klaus Jensen <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 98e3528 commit 5a5754a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/nvme/host/pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,6 +3102,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
31023102

31033103
nvme_start_ctrl(&dev->ctrl);
31043104
nvme_put_ctrl(&dev->ctrl);
3105+
flush_work(&dev->ctrl.scan_work);
31053106
return 0;
31063107

31073108
out_disable:

0 commit comments

Comments
 (0)