]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: replace cgroup_subsys->disabled tests with cgroup_subsys_enabled()
authorTejun Heo <tj@kernel.org>
Fri, 18 Sep 2015 15:56:28 +0000 (11:56 -0400)
committerTejun Heo <tj@kernel.org>
Fri, 18 Sep 2015 15:56:28 +0000 (11:56 -0400)
commit67e280f3aac444c534878983a1458d7883ca46ed
tree796ae052c16ea4a381df3e7c12982b4eeefd5e54
parent824d3b12d45136b49f7600cf5afb308ef4b7af2b
cgroup: replace cgroup_subsys->disabled tests with cgroup_subsys_enabled()

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: Tejun Heo <tj@kernel.org>
Acked-by: Zefan Li <lizefan@huawei.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
include/linux/cgroup-defs.h
include/linux/hugetlb_cgroup.h
include/linux/memcontrol.h
kernel/cgroup.c