cgroup: compare css to cgroup::self in helper for distingushing css
authorJP Kobryn <inwardvessel@gmail.com>
Thu, 15 May 2025 00:19:33 +0000 (17:19 -0700)
committerTejun Heo <tj@kernel.org>
Mon, 19 May 2025 20:21:24 +0000 (10:21 -1000)
commit541a4219bd66bef56d93dbd306dc64a4d70ae99e
treed93048d2570693b3b235bda740e4e0cded0ac0ee
parentb2713a5ad396179e28bfbab892f3fcb9bdf04ce0
cgroup: compare css to cgroup::self in helper for distingushing css

Adjust the implementation of css_is_cgroup() so that it compares the given
css to cgroup::self. Rename the function to css_is_self() in order to
reflect that. Change the existing css->ss NULL check to a warning in the
true branch. Finally, adjust call sites to use the new function name.

Signed-off-by: JP Kobryn <inwardvessel@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup.h
kernel/cgroup/cgroup.c