Commit f80dd11d authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

block: BFQ: Move an invariant check

Check bfqq->dispatched for each BFQ queue instead of checking it for an
invalid bfqq pointer.

Fixes: 3e49c1e4 ("block: BFQ: Add several invariant checks")
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230519220347.3643295-1-bvanassche@acm.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1172d5b8
......@@ -5405,6 +5405,7 @@ void bfq_put_queue(struct bfq_queue *bfqq)
WARN_ON_ONCE(!list_empty(&bfqq->fifo));
WARN_ON_ONCE(!RB_EMPTY_ROOT(&bfqq->sort_list));
WARN_ON_ONCE(bfqq->dispatched);
kmem_cache_free(bfq_pool, bfqq);
bfqg_and_blkg_put(bfqg);
......@@ -7150,7 +7151,6 @@ static void bfq_exit_queue(struct elevator_queue *e)
for (actuator = 0; actuator < bfqd->num_actuators; actuator++)
WARN_ON_ONCE(bfqd->rq_in_driver[actuator]);
WARN_ON_ONCE(bfqd->tot_rq_in_driver);
WARN_ON_ONCE(bfqq->dispatched);
hrtimer_cancel(&bfqd->idle_slice_timer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment