[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190703020749.22988-1-rocking@whu.edu.cn>
Date: Wed, 3 Jul 2019 10:07:49 +0800
From: Peng Wang <rocking@....edu.cn>
To: tj@...nel.org, lizefan@...wei.com, hannes@...xchg.org
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
Peng Wang <rocking@....edu.cn>
Subject: [PATCH] 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@....edu.cn>
---
kernel/cgroup/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index bf9dbffd46b1..a988d77f6c6d 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();
--
2.19.1
Powered by blists - more mailing lists