[Devel] [PATCH rh7] cgroup: switch to new percpu_ref API
Vladimir Davydov
vdavydov at virtuozzo.com
Mon Dec 21 07:54:59 PST 2015
Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
kernel/cgroup.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 42683739c0dc..9d2a4520d195 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4163,6 +4163,7 @@ static void css_dput_fn(struct work_struct *work)
struct cgroup_subsys_state *css =
container_of(work, struct cgroup_subsys_state, dput_work);
+ percpu_ref_exit(&css->refcnt);
cgroup_dput(css->cgroup);
}
@@ -4300,7 +4301,7 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
goto err_free_all;
}
- err = percpu_ref_init(&css->refcnt, css_release);
+ err = percpu_ref_init(&css->refcnt, css_release, 0, GFP_KERNEL);
if (err)
goto err_free_all;
@@ -4365,7 +4366,7 @@ err_free_all:
struct cgroup_subsys_state *css = cgrp->subsys[ss->subsys_id];
if (css) {
- percpu_ref_cancel_init(&css->refcnt);
+ percpu_ref_exit(&css->refcnt);
ss->css_free(cgrp);
}
}
--
2.1.4
More information about the Devel
mailing list