• Tejun Heo's avatar
    cgroup: replace cgroup_subsys->disabled tests with cgroup_subsys_enabled() · fc5ed1e9
    Tejun Heo authored
    Replace cgroup_subsys->disabled tests in controllers with
    cgroup_subsys_enabled().  cgroup_subsys_enabled() requires literal
    subsys name as its parameter and thus can't be used for cgroup core
    which iterates through controllers.  For cgroup core, introduce and
    use cgroup_ssid_enabled() which uses slower static_key_enabled() test
    and can be indexed by subsys ID.
    
    This leaves cgroup_subsys->disabled unused.  Removed.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarZefan Li <lizefan@huawei.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@kernel.org>
    fc5ed1e9
cgroup.c 155 KB