Message ID | 20180328024422.GA1352@jagdpanzerIV (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 0dfec0dedd5e..6c930fbdd24c 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1825,9 +1825,13 @@ static void scsi_request_fn(struct request_queue *q) break; if (unlikely(!scsi_device_online(sdev))) { + scsi_kill_request(req, q); + spin_unlock_irq(q->queue_lock); + sdev_printk(KERN_ERR, sdev, "rejecting I/O to offline device\n"); - scsi_kill_request(req, q); + + spin_lock_irq(q->queue_lock); continue; }