diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 1f63fc834dc3e6dab428ead1a0daee3b56574059..900a777e01c26a511fca0230d7c0f9edf4fb3111 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -475,7 +475,7 @@ static struct throtl_grp *throtl_lookup_create_tg(struct throtl_data *td, /* if %NULL and @q is alive, fall back to root_tg */ if (!IS_ERR(blkg)) tg = blkg_to_tg(blkg); - else if (!blk_queue_dying(q)) + else tg = td_root_tg(td); } @@ -1438,10 +1438,11 @@ bool blk_throtl_bio(struct request_queue *q, struct bio *bio) * IO group */ spin_lock_irq(q->queue_lock); - tg = throtl_lookup_create_tg(td, blkcg); - if (unlikely(!tg)) + + if (unlikely(blk_queue_bypass(q))) goto out_unlock; + tg = throtl_lookup_create_tg(td, blkcg); sq = &tg->service_queue; while (true) {