Commit 08f9788a authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] fix REQ_QUEUED clearing in blk_insert_request()

parent f6c2354a
...@@ -1253,7 +1253,7 @@ struct request *__blk_get_request(request_queue_t *q, int rw) ...@@ -1253,7 +1253,7 @@ struct request *__blk_get_request(request_queue_t *q, int rw)
* host that is unable to accept a particular command. * host that is unable to accept a particular command.
*/ */
void blk_insert_request(request_queue_t *q, struct request *rq, void blk_insert_request(request_queue_t *q, struct request *rq,
int at_head, void *data) int at_head, void *data)
{ {
unsigned long flags; unsigned long flags;
...@@ -1262,15 +1262,18 @@ void blk_insert_request(request_queue_t *q, struct request *rq, ...@@ -1262,15 +1262,18 @@ void blk_insert_request(request_queue_t *q, struct request *rq,
* must not attempt merges on this) and that it acts as a soft * must not attempt merges on this) and that it acts as a soft
* barrier * barrier
*/ */
rq->flags &= REQ_QUEUED;
rq->flags |= REQ_SPECIAL | REQ_BARRIER; rq->flags |= REQ_SPECIAL | REQ_BARRIER;
rq->special = data; rq->special = data;
spin_lock_irqsave(q->queue_lock, flags); spin_lock_irqsave(q->queue_lock, flags);
/* If command is tagged, release the tag */
if(blk_rq_tagged(rq)) /*
* If command is tagged, release the tag
*/
if (blk_rq_tagged(rq))
blk_queue_end_tag(q, rq); blk_queue_end_tag(q, rq);
_elv_add_request(q, rq, !at_head, 0); _elv_add_request(q, rq, !at_head, 0);
q->request_fn(q); q->request_fn(q);
spin_unlock_irqrestore(q->queue_lock, flags); spin_unlock_irqrestore(q->queue_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment