aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index be45d2f6008a..cace83ddbcdc 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3746,12 +3746,13 @@ static void check_for_release(struct cgroup *cgrp)
3746 } 3746 }
3747} 3747}
3748 3748
3749void __css_put(struct cgroup_subsys_state *css) 3749/* Caller must verify that the css is not for root cgroup */
3750void __css_put(struct cgroup_subsys_state *css, int count)
3750{ 3751{
3751 struct cgroup *cgrp = css->cgroup; 3752 struct cgroup *cgrp = css->cgroup;
3752 int val; 3753 int val;
3753 rcu_read_lock(); 3754 rcu_read_lock();
3754 val = atomic_dec_return(&css->refcnt); 3755 val = atomic_sub_return(count, &css->refcnt);
3755 if (val == 1) { 3756 if (val == 1) {
3756 if (notify_on_release(cgrp)) { 3757 if (notify_on_release(cgrp)) {
3757 set_bit(CGRP_RELEASABLE, &cgrp->flags); 3758 set_bit(CGRP_RELEASABLE, &cgrp->flags);