Skip to content

Commit a2b5d54

Browse files
committed
nvme: sync timeout work on failed reset
Timeouts during reset will set the controller for failure, preventing the state change to LIVE. Ensure all timeout work is synced after the controller disabling completes to ensure we don't have any other tasks messing with any namespace request_queue's. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent 2ab4e5f commit a2b5d54

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
@@ -2777,6 +2777,7 @@ static void nvme_reset_work(struct work_struct *work)
27772777
result);
27782778
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DELETING);
27792779
nvme_dev_disable(dev, true);
2780+
nvme_sync_queues(&dev->ctrl);
27802781
nvme_mark_namespaces_dead(&dev->ctrl);
27812782
nvme_unquiesce_io_queues(&dev->ctrl);
27822783
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DEAD);

0 commit comments

Comments
 (0)