aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-25 12:36:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-25 12:36:35 -0400
commit3961cdf85b749f6bab50ad31ee97e9277e7a3b70 (patch)
tree830ddec331de404b57d3bbd71f7a1998025c41f9
parentd39dd11c3e6a7af5c20bfac40594db36cf270f42 (diff)
parentad3d9d7ede04a9c71be7a9fe1a23961817f371f7 (diff)
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
-rw-r--r--block/blk-core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 59b5c00c0126..e0a062363937 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -271,7 +271,7 @@ EXPORT_SYMBOL(blk_start_queue);
271 **/ 271 **/
272void blk_stop_queue(struct request_queue *q) 272void blk_stop_queue(struct request_queue *q)
273{ 273{
274 cancel_delayed_work(&q->delay_work); 274 __cancel_delayed_work(&q->delay_work);
275 queue_flag_set(QUEUE_FLAG_STOPPED, q); 275 queue_flag_set(QUEUE_FLAG_STOPPED, q);
276} 276}
277EXPORT_SYMBOL(blk_stop_queue); 277EXPORT_SYMBOL(blk_stop_queue);
@@ -2702,7 +2702,10 @@ static void flush_plug_list(struct blk_plug *plug)
2702 /* 2702 /*
2703 * rq is already accounted, so use raw insert 2703 * rq is already accounted, so use raw insert
2704 */ 2704 */
2705 __elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE); 2705 if (rq->cmd_flags & (REQ_FLUSH | REQ_FUA))
2706 __elv_add_request(q, rq, ELEVATOR_INSERT_FLUSH);
2707 else
2708 __elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE);
2706 } 2709 }
2707 2710
2708 if (q) { 2711 if (q) {