Merge tag 'exfat-for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linki...
[linux-2.6-microblaze.git] / block / bfq-wf2q.c
index 070e34a..7a462df 100644 (file)
@@ -1706,4 +1706,12 @@ void bfq_add_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq)
 
        if (bfqq->wr_coeff > 1)
                bfqd->wr_busy_queues++;
+
+       /* Move bfqq to the head of the woken list of its waker */
+       if (!hlist_unhashed(&bfqq->woken_list_node) &&
+           &bfqq->woken_list_node != bfqq->waker_bfqq->woken_list.first) {
+               hlist_del_init(&bfqq->woken_list_node);
+               hlist_add_head(&bfqq->woken_list_node,
+                              &bfqq->waker_bfqq->woken_list);
+       }
 }