Commit 3961cdf8 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  block: fix issue with calling blk_stop_queue() from the request_fn handler
  block: fix bug with inserting flush requests as sort/merge
parents d39dd11c ad3d9d7e
...@@ -271,7 +271,7 @@ EXPORT_SYMBOL(blk_start_queue); ...@@ -271,7 +271,7 @@ EXPORT_SYMBOL(blk_start_queue);
**/ **/
void blk_stop_queue(struct request_queue *q) void blk_stop_queue(struct request_queue *q)
{ {
cancel_delayed_work(&q->delay_work); __cancel_delayed_work(&q->delay_work);
queue_flag_set(QUEUE_FLAG_STOPPED, q); queue_flag_set(QUEUE_FLAG_STOPPED, q);
} }
EXPORT_SYMBOL(blk_stop_queue); EXPORT_SYMBOL(blk_stop_queue);
...@@ -2702,7 +2702,10 @@ static void flush_plug_list(struct blk_plug *plug) ...@@ -2702,7 +2702,10 @@ static void flush_plug_list(struct blk_plug *plug)
/* /*
* rq is already accounted, so use raw insert * rq is already accounted, so use raw insert
*/ */
__elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE); if (rq->cmd_flags & (REQ_FLUSH | REQ_FUA))
__elv_add_request(q, rq, ELEVATOR_INSERT_FLUSH);
else
__elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE);
} }
if (q) { if (q) {
......
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