Commit a581563f authored by Peng Wang's avatar Peng Wang Committed by Tejun Heo
Browse files

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: default avatarPeng Wang <rocking@whu.edu.cn>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 85db0023
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -488,7 +488,7 @@ static struct cgroup_subsys_state *cgroup_tryget_css(struct cgroup *cgrp,

	rcu_read_lock();
	css = cgroup_css(cgrp, ss);
	if (!css || !css_tryget_online(css))
	if (css && !css_tryget_online(css))
		css = NULL;
	rcu_read_unlock();