aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2005-04-24 03:06:36 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 13:53:29 -0400
commit283369ccc26705bd9585a0e533c92bd7364c28d1 (patch)
treeab48a0466020040d7476c9b0c8d245629c65f545 /drivers/scsi/scsi_lib.c
parent867d1191fca388a79e4bb500dd85a9e871c96b99 (diff)
[SCSI] make scsi_requeue_request() use blk_requeue_request()
scsi_requeue_request() used to use blk_insert_request() for requeueing requests. This depends on the unobvious behavior of blk_insert_request() setting REQ_SPECIAL and REQ_SOFTBARRIER when requeueing. This patch makes scsi_queue_insert() use blk_requeue_request(). As REQ_SPECIAL means special requests and REQ_SOFTBARRIER is automatically handled by blk layer now, no flag needs to be set. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 47a4ad40bf4e..0b33e4f1a51e 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)
485 */ 485 */
486static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd) 486static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd)
487{ 487{
488 unsigned long flags;
489
488 cmd->request->flags &= ~REQ_DONTPREP; 490 cmd->request->flags &= ~REQ_DONTPREP;
489 blk_insert_request(q, cmd->request, 1, cmd, 1); 491
492 spin_lock_irqsave(q->queue_lock, flags);
493 blk_requeue_request(q, cmd->request);
494 spin_unlock_irqrestore(q->queue_lock, flags);
490 495
491 scsi_run_queue(q); 496 scsi_run_queue(q);
492} 497}