Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339339
b: refs/heads/master
c: 02ae748
h: refs/heads/master
i:
  339337: cc0a1d5
  339335: 09f0aa1
v: v3
  • Loading branch information
Tejun Heo committed Nov 19, 2012
1 parent 071664a commit 05d9432
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 648bb56d076bde31113f09a7d24d95bc8d4155ac
refs/heads/master: 02ae7486d05ae6df8395409a4945b2420f1e35c2
15 changes: 14 additions & 1 deletion trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -4420,9 +4420,10 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss)
if (ss->use_id) {
int ret = cgroup_init_idr(ss, css);
if (ret) {
dummytop->subsys[ss->subsys_id] = NULL;
ss->destroy(dummytop);
dummytop->subsys[ss->subsys_id] = NULL;
subsys[ss->subsys_id] = NULL;
list_del_init(&ss->sibling);
mutex_unlock(&cgroup_mutex);
return ret;
}
Expand Down Expand Up @@ -4490,7 +4491,19 @@ void cgroup_unload_subsys(struct cgroup_subsys *ss)
*/
BUG_ON(ss->root != &rootnode);

/* ->pre_destroy() should be called outside cgroup_mutex for now */
if (ss->pre_destroy)
ss->pre_destroy(dummytop);

mutex_lock(&cgroup_mutex);

ss->active = 0;

if (ss->use_id) {
idr_remove_all(&ss->idr);
idr_destroy(&ss->idr);
}

/* deassign the subsys_id */
subsys[ss->subsys_id] = NULL;

Expand Down

0 comments on commit 05d9432

Please sign in to comment.