Skip to content

Commit 251ef6f

Browse files
Casey ChenChristoph Hellwig
authored andcommitted
nvme-pci: do not call nvme_dev_remove_admin from nvme_remove
nvme_dev_remove_admin could free dev->admin_q and the admin_tagset while they are being accessed by nvme_dev_disable(), which can be called by nvme_reset_work via nvme_remove_dead_ctrl. Commit cb4bfda ("nvme-pci: fix hot removal during error handling") intended to avoid requests being stuck on a removed controller by killing the admin queue. But the later fix c8e9e9b ("nvme-pci: unquiesce admin queue on shutdown"), together with nvme_dev_disable(dev, true) right before nvme_dev_remove_admin() could help dispatch requests and fail them early, so we don't need nvme_dev_remove_admin() any more. Fixes: cb4bfda ("nvme-pci: fix hot removal during error handling") Signed-off-by: Casey Chen <[email protected]> Reviewed-by: Keith Busch <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent e4b9852 commit 251ef6f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/nvme/host/pci.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3012,7 +3012,6 @@ static void nvme_remove(struct pci_dev *pdev)
30123012
if (!pci_device_is_present(pdev)) {
30133013
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DEAD);
30143014
nvme_dev_disable(dev, true);
3015-
nvme_dev_remove_admin(dev);
30163015
}
30173016

30183017
flush_work(&dev->ctrl.reset_work);

0 commit comments

Comments
 (0)