diff options
author | Bart Van Assche <bvanassche@acm.org> | 2023-05-20 00:03:46 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-05-20 03:59:52 +0200 |
commit | f80dd11dd1d07ada04a9fcd57032fa82e136462d (patch) | |
tree | 23bfa841a854598b10c98e007fe97bc189316f94 /block | |
parent | ublk: support user copy (diff) | |
download | linux-f80dd11dd1d07ada04a9fcd57032fa82e136462d.tar.xz linux-f80dd11dd1d07ada04a9fcd57032fa82e136462d.zip |
block: BFQ: Move an invariant check
Check bfqq->dispatched for each BFQ queue instead of checking it for an
invalid bfqq pointer.
Fixes: 3e49c1e4a615 ("block: BFQ: Add several invariant checks")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230519220347.3643295-1-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/bfq-iosched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index c5727afad159..09bbbcf9e049 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -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); |