blk-mq: merge blk_mq_drain_queue and __blk_mq_drain_queue
authorChristoph Hellwig <hch@lst.de>
Fri, 13 Jun 2014 17:43:35 +0000 (19:43 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 13 Jun 2014 18:17:40 +0000 (12:17 -0600)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c

index fd8b485d128821f81c8ed387b4fa179c471be4aa..0ef2dc7f01bf725884e9fbdff2dd5ea2a852f15b 100644 (file)
@@ -109,7 +109,7 @@ static void blk_mq_queue_exit(struct request_queue *q)
        __percpu_counter_add(&q->mq_usage_counter, -1, 1000000);
 }
 
-static void __blk_mq_drain_queue(struct request_queue *q)
+void blk_mq_drain_queue(struct request_queue *q)
 {
        while (true) {
                s64 count;
@@ -139,12 +139,7 @@ static void blk_mq_freeze_queue(struct request_queue *q)
        spin_unlock_irq(q->queue_lock);
 
        if (drain)
-               __blk_mq_drain_queue(q);
-}
-
-void blk_mq_drain_queue(struct request_queue *q)
-{
-       __blk_mq_drain_queue(q);
+               blk_mq_drain_queue(q);
 }
 
 static void blk_mq_unfreeze_queue(struct request_queue *q)