Skip to content

Commit

Permalink
[SCSI] make scsi_requeue_request() use blk_requeue_request()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and James Bottomley committed May 20, 2005
1 parent 867d119 commit 283369c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 283369c

Please sign in to comment.