diff options
author | Peng Wang <rocking@whu.edu.cn> | 2019-07-03 04:07:49 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2019-07-24 00:46:33 +0200 |
commit | a581563f1bef035e4c8d634a1df26dae9140b115 (patch) | |
tree | c2f3d467fc72ee254abcbeeca6015b21fa0ebe80 /kernel/cgroup | |
parent | cgroup: Replace a seq_printf() call by seq_puts() in cgroup_print_ss_mask() (diff) | |
download | linux-a581563f1bef035e4c8d634a1df26dae9140b115.tar.xz linux-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/cgroup')
-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(); |