]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - block/bfq-wf2q.c
block, bfq: fix queue removal from weights tree
[thirdparty/kernel/stable.git] / block / bfq-wf2q.c
index ce37d709a34f0e72af2132b5783c8d55c9ee680f..63311d1ff1edf41823ef2790ac3175535d2f2ef5 100644 (file)
@@ -1673,15 +1673,15 @@ void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq,
 
        bfqd->busy_queues[bfqq->ioprio_class - 1]--;
 
-       if (!bfqq->dispatched)
-               bfq_weights_tree_remove(bfqd, bfqq);
-
        if (bfqq->wr_coeff > 1)
                bfqd->wr_busy_queues--;
 
        bfqg_stats_update_dequeue(bfqq_group(bfqq));
 
        bfq_deactivate_bfqq(bfqd, bfqq, true, expiration);
+
+       if (!bfqq->dispatched)
+               bfq_weights_tree_remove(bfqd, bfqq);
 }
 
 /*