diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 47a4ad40bf4e4dae6aa5daa13fd98b92b857f905..0b33e4f1a51ec49d387c7a7ac7847f4aa147cd97 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -485,8 +485,13 @@ static void scsi_run_queue(struct request_queue *q) */ static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd) { + unsigned long flags; + cmd->request->flags &= ~REQ_DONTPREP; - blk_insert_request(q, cmd->request, 1, cmd, 1); + + spin_lock_irqsave(q->queue_lock, flags); + blk_requeue_request(q, cmd->request); + spin_unlock_irqrestore(q->queue_lock, flags); scsi_run_queue(q); }