diff options
author | Tejun Heo <tj@kernel.org> | 2019-06-13 18:30:40 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-06-15 12:39:40 -0400 |
commit | 71c814077de60b2e7415dac6f5c4e98f59d521fd (patch) | |
tree | e2c3740fdd60c8fb9fb50b2256f608f486916eb8 /block | |
parent | ef069b97feec11c2399bbc5f6f347b35482105dc (diff) |
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: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 04d286934c5e..440797293235 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -1390,7 +1390,8 @@ pd_prealloc: | |||
1390 | 1390 | ||
1391 | spin_lock_irq(&q->queue_lock); | 1391 | spin_lock_irq(&q->queue_lock); |
1392 | 1392 | ||
1393 | list_for_each_entry(blkg, &q->blkg_list, q_node) { | 1393 | /* blkg_list is pushed at the head, reverse walk to init parents first */ |
1394 | list_for_each_entry_reverse(blkg, &q->blkg_list, q_node) { | ||
1394 | struct blkg_policy_data *pd; | 1395 | struct blkg_policy_data *pd; |
1395 | 1396 | ||
1396 | if (blkg->pd[pol->plid]) | 1397 | if (blkg->pd[pol->plid]) |