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 <its@irrelevant.dk> Signed-off-by: Keith Busch <kbusch@kernel.org> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Klaus Jensen <k.jensen@samsung.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 98e3528 commit 5a5754a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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)