forked from luck/tmp_suning_uos_patched
cgroup: minor tweak for logic to get cgroup css
We could only handle the case that css exists and css_try_get_online() fails. Signed-off-by: Peng Wang <rocking@whu.edu.cn> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
85db002337
commit
a581563f1b
|
@ -488,7 +488,7 @@ static struct cgroup_subsys_state *cgroup_tryget_css(struct cgroup *cgrp,
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
css = cgroup_css(cgrp, ss);
|
css = cgroup_css(cgrp, ss);
|
||||||
if (!css || !css_tryget_online(css))
|
if (css && !css_tryget_online(css))
|
||||||
css = NULL;
|
css = NULL;
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user