block: Fix blk_start_queueing() to not kick a stopped queue
authorElias Oltmanns <eo@nebensachen.de>
Wed, 1 Oct 2008 14:02:33 +0000 (16:02 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 9 Oct 2008 06:56:20 +0000 (08:56 +0200)
blk_start_queueing() should act like the generic queue unplugging
and kicking and ignore a stopped queue. Such a queue may not be
run until after a call to blk_start_queue().

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-core.c

index fa212348c4c96df59b41325259d2215eed12abd6..c66333d8e48d168e044d0d3a1c9113b3b2a9fc27 100644 (file)
@@ -890,9 +890,11 @@ EXPORT_SYMBOL(blk_get_request);
  */
 void blk_start_queueing(struct request_queue *q)
 {
-       if (!blk_queue_plugged(q))
+       if (!blk_queue_plugged(q)) {
+               if (unlikely(blk_queue_stopped(q)))
+                       return;
                q->request_fn(q);
-       else
+       else
                __generic_unplug_device(q);
 }
 EXPORT_SYMBOL(blk_start_queueing);