memcg: convert away from cftype->read() and ->read_map()
authorTejun Heo <tj@kernel.org>
Thu, 5 Dec 2013 17:28:02 +0000 (12:28 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 5 Dec 2013 17:28:02 +0000 (12:28 -0500)
commit791badbdb3e4fc1001ee3bcdaedc6d4f167fcbe8
treea922371b9b35bdbb51a8bb2e67c74696d10edced
parent51ffe41178c49738e4d6d17b9bdcf528a262abc8
memcg: convert away from cftype->read() and ->read_map()

In preparation of conversion to kernfs, cgroup file handling is being
consolidated so that it can be easily mapped to the seq_file based
interface of kernfs.

cftype->read_map() doesn't add any value and being replaced with
->read_seq_string(), and all users of cftype->read() can be easily
served, usually better, by seq_file and other methods.

Update mem_cgroup_read() to return u64 instead of printing itself and
rename it to mem_cgroup_read_u64(), and update
mem_cgroup_oom_control_read() to use ->read_seq_string() instead of
->read_map().

This patch doesn't make any visible behavior changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Li Zefan <lizefan@huawei.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
mm/memcontrol.c