]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
blk-throttle: remove tg_drain_bios
authorGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Fri, 8 May 2020 22:00:13 +0000 (00:00 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 29 May 2020 22:30:39 +0000 (16:30 -0600)
After blk_throtl_drain is removed, there is no caller of tg_drain_bios,
so remove it as well.

Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c

index 0b2ce7fb77a770f0b683de0e36f80376bd4dc55e..209fdd8939fba636996dce2a4536df5c0c649450 100644 (file)
@@ -2358,28 +2358,6 @@ void blk_throtl_bio_endio(struct bio *bio)
 }
 #endif
 
-/*
- * Dispatch all bios from all children tg's queued on @parent_sq.  On
- * return, @parent_sq is guaranteed to not have any active children tg's
- * and all bios from previously active tg's are on @parent_sq->bio_lists[].
- */
-static void tg_drain_bios(struct throtl_service_queue *parent_sq)
-{
-       struct throtl_grp *tg;
-
-       while ((tg = throtl_rb_first(parent_sq))) {
-               struct throtl_service_queue *sq = &tg->service_queue;
-               struct bio *bio;
-
-               throtl_dequeue_tg(tg);
-
-               while ((bio = throtl_peek_queued(&sq->queued[READ])))
-                       tg_dispatch_one_bio(tg, bio_data_dir(bio));
-               while ((bio = throtl_peek_queued(&sq->queued[WRITE])))
-                       tg_dispatch_one_bio(tg, bio_data_dir(bio));
-       }
-}
-
 int blk_throtl_init(struct request_queue *q)
 {
        struct throtl_data *td;