Commit 71c81407 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe

blkcg: blkcg_activate_policy() should initialize ancestors first

When blkcg_activate_policy() is creating blkg_policy_data for existing
blkgs, it did in the wrong order - descendants first.  Fix it.  None
of the existing controllers seem affected by this.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ef069b97
......@@ -1390,7 +1390,8 @@ int blkcg_activate_policy(struct request_queue *q,
spin_lock_irq(&q->queue_lock);
list_for_each_entry(blkg, &q->blkg_list, q_node) {
/* blkg_list is pushed at the head, reverse walk to init parents first */
list_for_each_entry_reverse(blkg, &q->blkg_list, q_node) {
struct blkg_policy_data *pd;
if (blkg->pd[pol->plid])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment