diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c index 0c7ee5d023ec32c7af35e3d4d104f793dd504f4d..9c3957d37069f85004e357dc4fac0e1b826c5a3b 100644 --- a/block/bfq-cgroup.c +++ b/block/bfq-cgroup.c @@ -526,12 +526,13 @@ struct bfq_group *bfq_find_set_group(struct bfq_data *bfqd, */ entity = &bfqg->entity; for_each_entity(entity) { - bfqg = container_of(entity, struct bfq_group, entity); - if (bfqg != bfqd->root_group) { - parent = bfqg_parent(bfqg); + struct bfq_group *curr_bfqg = container_of(entity, + struct bfq_group, entity); + if (curr_bfqg != bfqd->root_group) { + parent = bfqg_parent(curr_bfqg); if (!parent) parent = bfqd->root_group; - bfq_group_set_parent(bfqg, parent); + bfq_group_set_parent(curr_bfqg, parent); } }