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 /include/linux/memcontrol.h | |
| 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 'include/linux/memcontrol.h')
| -rw-r--r-- | include/linux/memcontrol.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 0651865a4564..6a48398a1f4e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -893,7 +893,7 @@ static inline bool mem_cgroup_online(struct mem_cgroup *memcg) { if (mem_cgroup_disabled()) return true; - return !!(memcg->css.flags & CSS_ONLINE); + return css_is_online(&memcg->css); } void mem_cgroup_update_lru_size(struct lruvec *lruvec, enum lru_list lru, |
