summaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorTejun Heo2013-12-05 18:28:04 +0100
committerTejun Heo2013-12-05 18:28:04 +0100
commit7da112792753d71aed44b918395892a1fc53048a (patch)
tree7b370245a961024428a9247f8999f0f4b51c2c4f /mm/memcontrol.c
parentcgroup: generalize cgroup_pidlist_open_file (diff)
downloadkernel-qcow2-linux-7da112792753d71aed44b918395892a1fc53048a.tar.gz
kernel-qcow2-linux-7da112792753d71aed44b918395892a1fc53048a.tar.xz
kernel-qcow2-linux-7da112792753d71aed44b918395892a1fc53048a.zip
cgroup: attach cgroup_open_file to all cgroup files
In preparation of conversion to kernfs, cgroup file handling is updated so that it can be easily mapped to kernfs. This patch attaches cgroup_open_file, which used to be attached to pidlist files, to all cgroup files, introduces seq_css/cft() accessors to determine the cgroup_subsys_state and cftype associated with a given cgroup seq_file, exports them as public interface. This doesn't cause any behavior changes but unifies cgroup file handling across different file types and will help converting them to kernfs seq_show() interface. v2: Li pointed out that the original patch was using single_open_size() incorrectly assuming that the size param is private data size. Fix it by allocating @of separately and passing it to single_open() and explicitly freeing it in the release path. This isn't the prettiest but this path is gonna be restructured by the following patches pretty soon. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'mm/memcontrol.c')
0 files changed, 0 insertions, 0 deletions