diff options
author | Peng Wang <rocking@whu.edu.cn> | 2019-07-03 10:07:49 +0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2019-07-23 15:46:33 -0700 |
commit | a581563f1bef035e4c8d634a1df26dae9140b115 (patch) | |
tree | c2f3d467fc72ee254abcbeeca6015b21fa0ebe80 /kernel | |
parent | 85db0023376f529c477c6110043e069ccee16d9c (diff) | |
download | linux-stable-a581563f1bef035e4c8d634a1df26dae9140b115.tar.gz linux-stable-a581563f1bef035e4c8d634a1df26dae9140b115.tar.bz2 linux-stable-a581563f1bef035e4c8d634a1df26dae9140b115.zip |
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cgroup/cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 3c3d92d993e8..21ddf3053235 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -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(); |