cgroup: make cftype->[un]register_event() deal with cgroup_subsys_state instead of...
authorTejun Heo <tj@kernel.org>
Fri, 9 Aug 2013 00:11:26 +0000 (20:11 -0400)
committerTejun Heo <tj@kernel.org>
Fri, 9 Aug 2013 00:11:26 +0000 (20:11 -0400)
commit81eeaf0411204f52af8ef78ff107cfca2fcfec1d
tree50ef753a5f351d9b838c0fbcf16f9e3b3723cc15
parent72ec7029937f0518eff21b8762743c31591684f5
cgroup: make cftype->[un]register_event() deal with cgroup_subsys_state instead of cgroup

cgroup is in the process of converting to css (cgroup_subsys_state)
from cgroup as the principal subsystem interface handle.  This is
mostly to prepare for the unified hierarchy support where css's will
be created and destroyed dynamically but also helps cleaning up
subsystem implementations as css is usually what they are interested
in anyway.

cftype->[un]register_event() is among the remaining couple interfaces
which still use struct cgroup.  Convert it to cgroup_subsys_state.
The conversion is mostly mechanical and removes the last users of
mem_cgroup_from_cont() and cg_to_vmpressure(), which are removed.

v2: indentation update as suggested by Li Zefan.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Balbir Singh <bsingharora@gmail.com>
include/linux/cgroup.h
include/linux/vmpressure.h
kernel/cgroup.c
mm/memcontrol.c
mm/vmpressure.c