Skip to content

Commit 4e69d4d

Browse files
committed
nvme: disable controller on reset state failure
If the controller is not in a RESETTING state at the point of reset work, we have to conclude the controller is being deleted. Go to the cleanup on this condition to ensure proper pairing of request_queue quiesce state. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent a2b5d54 commit 4e69d4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/nvme/host/pci.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2690,7 +2690,8 @@ static void nvme_reset_work(struct work_struct *work)
26902690
if (dev->ctrl.state != NVME_CTRL_RESETTING) {
26912691
dev_warn(dev->ctrl.device, "ctrl state %d is not RESETTING\n",
26922692
dev->ctrl.state);
2693-
return;
2693+
result = -ENODEV;
2694+
goto out;
26942695
}
26952696

26962697
/*

0 commit comments

Comments
 (0)