Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166649
b: refs/heads/master
c: 3dece83
h: refs/heads/master
i:
  166647: 53885ae
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Oct 1, 2009
1 parent fd75efd commit b0f4311
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 26251eaf98e26dc2ce2dc26d63bc502700760704
refs/heads/master: 3dece8347df6a16239fab10dadb370854f1c969c
5 changes: 4 additions & 1 deletion trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -3708,15 +3708,18 @@ static void check_for_release(struct cgroup *cgrp)
void __css_put(struct cgroup_subsys_state *css)
{
struct cgroup *cgrp = css->cgroup;
int val;
rcu_read_lock();
if (atomic_dec_return(&css->refcnt) == 1) {
val = atomic_dec_return(&css->refcnt);
if (val == 1) {
if (notify_on_release(cgrp)) {
set_bit(CGRP_RELEASABLE, &cgrp->flags);
check_for_release(cgrp);
}
cgroup_wakeup_rmdir_waiter(cgrp);
}
rcu_read_unlock();
WARN_ON_ONCE(val < 1);
}

/*
Expand Down

0 comments on commit b0f4311

Please sign in to comment.