Merge branch 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup updates from Tejun Heo: - cgroup2 interface for hugetlb controller. I think this was the last remaining bit which was missing from cgroup2 - fixes for race and a spurious warning in threaded cgroup handling - other minor changes * 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: iocost: Fix iocost_monitor.py due to helper type mismatch cgroup: Prevent double killing of css when enabling threaded cgroup cgroup: fix function name in comment mm: hugetlb controller for cgroups v2
This commit is contained in:
@@ -3055,8 +3055,6 @@ static int cgroup_apply_control_enable(struct cgroup *cgrp)
|
||||
for_each_subsys(ss, ssid) {
|
||||
struct cgroup_subsys_state *css = cgroup_css(dsct, ss);
|
||||
|
||||
WARN_ON_ONCE(css && percpu_ref_is_dying(&css->refcnt));
|
||||
|
||||
if (!(cgroup_ss_mask(dsct) & (1 << ss->id)))
|
||||
continue;
|
||||
|
||||
@@ -3066,6 +3064,8 @@ static int cgroup_apply_control_enable(struct cgroup *cgrp)
|
||||
return PTR_ERR(css);
|
||||
}
|
||||
|
||||
WARN_ON_ONCE(percpu_ref_is_dying(&css->refcnt));
|
||||
|
||||
if (css_visible(css)) {
|
||||
ret = css_populate_dir(css);
|
||||
if (ret)
|
||||
@@ -3101,11 +3101,11 @@ static void cgroup_apply_control_disable(struct cgroup *cgrp)
|
||||
for_each_subsys(ss, ssid) {
|
||||
struct cgroup_subsys_state *css = cgroup_css(dsct, ss);
|
||||
|
||||
WARN_ON_ONCE(css && percpu_ref_is_dying(&css->refcnt));
|
||||
|
||||
if (!css)
|
||||
continue;
|
||||
|
||||
WARN_ON_ONCE(percpu_ref_is_dying(&css->refcnt));
|
||||
|
||||
if (css->parent &&
|
||||
!(cgroup_ss_mask(dsct) & (1 << ss->id))) {
|
||||
kill_css(css);
|
||||
@@ -3392,7 +3392,8 @@ static ssize_t cgroup_type_write(struct kernfs_open_file *of, char *buf,
|
||||
if (strcmp(strstrip(buf), "threaded"))
|
||||
return -EINVAL;
|
||||
|
||||
cgrp = cgroup_kn_lock_live(of->kn, false);
|
||||
/* drain dying csses before we re-apply (threaded) subtree control */
|
||||
cgrp = cgroup_kn_lock_live(of->kn, true);
|
||||
if (!cgrp)
|
||||
return -ENOENT;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ void cgroup_rstat_updated(struct cgroup *cgrp, int cpu)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Paired with the one in cgroup_rstat_cpu_pop_upated(). Either we
|
||||
* Paired with the one in cgroup_rstat_cpu_pop_updated(). Either we
|
||||
* see NULL updated_next or they see our updated stat.
|
||||
*/
|
||||
smp_mb();
|
||||
|
||||
Reference in New Issue
Block a user