Commit 9fc5617d authored by James Bottomley's avatar James Bottomley

Fix SCSI device state model

Following a prior patch, we made cancel the sole
route into deleted, but forgot to update the 
state model checks to reflect this.

offline and created also go to cancel
parent efe46e51
...@@ -1610,7 +1610,9 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) ...@@ -1610,7 +1610,9 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state)
case SDEV_CANCEL: case SDEV_CANCEL:
switch (oldstate) { switch (oldstate) {
case SDEV_CREATED:
case SDEV_RUNNING: case SDEV_RUNNING:
case SDEV_OFFLINE:
break; break;
default: default:
goto illegal; goto illegal;
...@@ -1619,9 +1621,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) ...@@ -1619,9 +1621,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state)
case SDEV_DEL: case SDEV_DEL:
switch (oldstate) { switch (oldstate) {
case SDEV_CREATED:
case SDEV_CANCEL: case SDEV_CANCEL:
case SDEV_OFFLINE:
break; break;
default: default:
goto illegal; goto illegal;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment