diff options
| author | Chen Ridong <chenridong@huawei.com> | 2025-12-02 02:57:47 +0000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2025-12-08 09:02:38 -1000 |
| commit | 82d7e59ea707b55dc6c3ba3c56ded36742741bd4 (patch) | |
| tree | 3931abbcb5d4f3471ee13f09dcaed4461b2bfece /kernel | |
| parent | 50133c09d189a26f4cc6e78e382864fd599a1dc4 (diff) | |
cgroup: switch to css_is_online() helper
Use the new css_is_online() helper that has been introduced to check css
online state, instead of testing the CSS_ONLINE flag directly. This
improves readability and centralizes the state check logic.
No functional changes intended.
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cgroup/cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index e717208cfb18..34d6d4d99f97 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -4948,7 +4948,7 @@ bool css_has_online_children(struct cgroup_subsys_state *css) rcu_read_lock(); css_for_each_child(child, css) { - if (child->flags & CSS_ONLINE) { + if (css_is_online(child)) { ret = true; break; } @@ -5753,7 +5753,7 @@ static void offline_css(struct cgroup_subsys_state *css) lockdep_assert_held(&cgroup_mutex); - if (!(css->flags & CSS_ONLINE)) + if (!css_is_online(css)) return; if (ss->css_offline) |
