[Devel] [PATCH RHEL7 COMMIT] ms/cgroup: switch to new percpu_ref API
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Dec 25 01:18:40 PST 2015
The commit is pushed to "branch-rh7-3.10.0-327.3.1-vz7.10.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.3.1.el7
------>
commit 77254f38c229c2ed4d145638cfc0f37406ef0791
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date: Fri Dec 25 13:18:40 2015 +0400
ms/cgroup: switch to new percpu_ref API
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 4268373..9d2a452 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);
}
}
More information about the Devel
mailing list