diff options
-rw-r--r-- | kernel/cgroup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index fd572d057691..abf7248f501a 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -712,7 +712,7 @@ static int rebind_subsystems(struct cgroupfs_root *root, | |||
712 | BUG_ON(dummytop->subsys[i]->cgroup != dummytop); | 712 | BUG_ON(dummytop->subsys[i]->cgroup != dummytop); |
713 | cgrp->subsys[i] = dummytop->subsys[i]; | 713 | cgrp->subsys[i] = dummytop->subsys[i]; |
714 | cgrp->subsys[i]->cgroup = cgrp; | 714 | cgrp->subsys[i]->cgroup = cgrp; |
715 | list_add(&ss->sibling, &root->subsys_list); | 715 | list_move(&ss->sibling, &root->subsys_list); |
716 | ss->root = root; | 716 | ss->root = root; |
717 | if (ss->bind) | 717 | if (ss->bind) |
718 | ss->bind(ss, cgrp); | 718 | ss->bind(ss, cgrp); |
@@ -726,7 +726,7 @@ static int rebind_subsystems(struct cgroupfs_root *root, | |||
726 | dummytop->subsys[i]->cgroup = dummytop; | 726 | dummytop->subsys[i]->cgroup = dummytop; |
727 | cgrp->subsys[i] = NULL; | 727 | cgrp->subsys[i] = NULL; |
728 | subsys[i]->root = &rootnode; | 728 | subsys[i]->root = &rootnode; |
729 | list_del(&ss->sibling); | 729 | list_move(&ss->sibling, &rootnode.subsys_list); |
730 | } else if (bit & final_bits) { | 730 | } else if (bit & final_bits) { |
731 | /* Subsystem state should already exist */ | 731 | /* Subsystem state should already exist */ |
732 | BUG_ON(!cgrp->subsys[i]); | 732 | BUG_ON(!cgrp->subsys[i]); |
@@ -2521,6 +2521,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss) | |||
2521 | printk(KERN_INFO "Initializing cgroup subsys %s\n", ss->name); | 2521 | printk(KERN_INFO "Initializing cgroup subsys %s\n", ss->name); |
2522 | 2522 | ||
2523 | /* Create the top cgroup state for this subsystem */ | 2523 | /* Create the top cgroup state for this subsystem */ |
2524 | list_add(&ss->sibling, &rootnode.subsys_list); | ||
2524 | ss->root = &rootnode; | 2525 | ss->root = &rootnode; |
2525 | css = ss->create(ss, dummytop); | 2526 | css = ss->create(ss, dummytop); |
2526 | /* We don't handle early failures gracefully */ | 2527 | /* We don't handle early failures gracefully */ |