mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
This commit is contained in:
@@ -347,9 +347,15 @@ static inline bool css_is_dying(struct cgroup_subsys_state *css)
|
||||
return css->flags & CSS_DYING;
|
||||
}
|
||||
|
||||
static inline bool css_is_cgroup(struct cgroup_subsys_state *css)
|
||||
static inline bool css_is_self(struct cgroup_subsys_state *css)
|
||||
{
|
||||
return css->ss == NULL;
|
||||
if (css == &css->cgroup->self) {
|
||||
/* cgroup::self should not have subsystem association */
|
||||
WARN_ON(css->ss != NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void cgroup_get(struct cgroup *cgrp)
|
||||
|
||||
Reference in New Issue
Block a user