rb_insert_color(&cfqg->rb_node, &st->rb);
}
+/*
+ * This has to be called only on activation of cfqg
+ */
static void
cfq_update_group_weight(struct cfq_group *cfqg)
{
/* add to the service tree */
BUG_ON(!RB_EMPTY_NODE(&cfqg->rb_node));
+ /*
+ * Update leaf_weight. We cannot update weight at this point
+ * because cfqg might already have been activated and is
+ * contributing its current weight to the parent's child_weight.
+ */
cfq_update_group_leaf_weight(cfqg);
__cfq_group_service_tree_add(st, cfqg);