Commit 15a0b5fe authored by Xiu Jianfeng's avatar Xiu Jianfeng Committed by Tejun Heo

cgroup: don't call cgroup1_pidlist_destroy_all() for v2

Currently cgroup1_pidlist_destroy_all() will be called when releasing
cgroup even if the cgroup is on default hierarchy, however it doesn't
make any sense for v2 to destroy pidlist of v1.
Signed-off-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent a6b8daba
...@@ -5368,7 +5368,8 @@ static void css_free_rwork_fn(struct work_struct *work) ...@@ -5368,7 +5368,8 @@ static void css_free_rwork_fn(struct work_struct *work)
} else { } else {
/* cgroup free path */ /* cgroup free path */
atomic_dec(&cgrp->root->nr_cgrps); atomic_dec(&cgrp->root->nr_cgrps);
cgroup1_pidlist_destroy_all(cgrp); if (!cgroup_on_dfl(cgrp))
cgroup1_pidlist_destroy_all(cgrp);
cancel_work_sync(&cgrp->release_agent_work); cancel_work_sync(&cgrp->release_agent_work);
bpf_cgrp_storage_free(cgrp); bpf_cgrp_storage_free(cgrp);
......
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