packaging: Add spec file for VisionFive2
[platform/kernel/linux-starfive.git] / block / bfq-cgroup.c
index e2f1450..85b8e1c 100644 (file)
@@ -666,6 +666,12 @@ void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq,
                bfq_put_idle_entity(bfq_entity_service_tree(entity), entity);
        bfqg_and_blkg_put(bfqq_group(bfqq));
 
+       if (entity->parent &&
+           entity->parent->last_bfqq_created == bfqq)
+               entity->parent->last_bfqq_created = NULL;
+       else if (bfqd->last_bfqq_created == bfqq)
+               bfqd->last_bfqq_created = NULL;
+
        entity->parent = bfqg->my_entity;
        entity->sched_data = &bfqg->sched_data;
        /* pin down bfqg and its associated blkg  */