提交 9610e8ca 编写于 作者: T Tejun Heo 提交者: Yang Yingliang

blkcg: blkcg_activate_policy() should initialize ancestors first

mainline inclusion
from mainline-5.3-rc1
commit 71c81407
category: feature
bugzilla: 38688
CVE: NA

---------------------------

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: NTejun Heo <tj@kernel.org>
Signed-off-by: NJens Axboe <axboe@kernel.dk>

Conflict: block/blk-cgroup.c
Signed-off-by: NYu Kuai <yukuai3@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 ae770f09
...@@ -1445,7 +1445,8 @@ int blkcg_activate_policy(struct request_queue *q, ...@@ -1445,7 +1445,8 @@ int blkcg_activate_policy(struct request_queue *q,
spin_lock_irq(q->queue_lock); 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; struct blkg_policy_data *pd;
if (blkg->pd[pol->plid]) if (blkg->pd[pol->plid])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册