Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119190
b: refs/heads/master
c: 3fa59df
h: refs/heads/master
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Nov 20, 2008
1 parent bae05ab commit 48764be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: 0ae15132a4f5c758a6ffcde74495641dc3f62ba1
refs/heads/master: 3fa59dfbc3b223f02c26593be69ce6fc9a940405
14 changes: 9 additions & 5 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2472,18 +2472,22 @@ static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry)
mutex_unlock(&cgroup_mutex);
return -EBUSY;
}

parent = cgrp->parent;
root = cgrp->root;
sb = root->sb;
mutex_unlock(&cgroup_mutex);

/*
* Call pre_destroy handlers of subsys. Notify subsystems
* that rmdir() request comes.
*/
cgroup_call_pre_destroy(cgrp);

if (cgroup_has_css_refs(cgrp)) {
mutex_lock(&cgroup_mutex);
parent = cgrp->parent;
root = cgrp->root;
sb = root->sb;

if (atomic_read(&cgrp->count)
|| !list_empty(&cgrp->children)
|| cgroup_has_css_refs(cgrp)) {
mutex_unlock(&cgroup_mutex);
return -EBUSY;
}
Expand Down

0 comments on commit 48764be

Please sign in to comment.