aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/scsi_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 8041fe1ab179..eafeeda6e194 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -2438,7 +2438,8 @@ scsi_internal_device_unblock(struct scsi_device *sdev)
2438 sdev->sdev_state = SDEV_RUNNING; 2438 sdev->sdev_state = SDEV_RUNNING;
2439 else if (sdev->sdev_state == SDEV_CREATED_BLOCK) 2439 else if (sdev->sdev_state == SDEV_CREATED_BLOCK)
2440 sdev->sdev_state = SDEV_CREATED; 2440 sdev->sdev_state = SDEV_CREATED;
2441 else 2441 else if (sdev->sdev_state != SDEV_CANCEL &&
2442 sdev->sdev_state != SDEV_OFFLINE)
2442 return -EINVAL; 2443 return -EINVAL;
2443 2444
2444 spin_lock_irqsave(q->queue_lock, flags); 2445 spin_lock_irqsave(q->queue_lock, flags);