aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/memcontrol.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2e0bfc93484b..e227d7c5989f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -853,13 +853,10 @@ static int mem_cgroup_write_strategy(char *buf, unsigned long long *tmp)
853 return 0; 853 return 0;
854} 854}
855 855
856static ssize_t mem_cgroup_read(struct cgroup *cont, 856static u64 mem_cgroup_read(struct cgroup *cont, struct cftype *cft)
857 struct cftype *cft, struct file *file,
858 char __user *userbuf, size_t nbytes, loff_t *ppos)
859{ 857{
860 return res_counter_read(&mem_cgroup_from_cont(cont)->res, 858 return res_counter_read_u64(&mem_cgroup_from_cont(cont)->res,
861 cft->private, userbuf, nbytes, ppos, 859 cft->private);
862 NULL);
863} 860}
864 861
865static ssize_t mem_cgroup_write(struct cgroup *cont, struct cftype *cft, 862static ssize_t mem_cgroup_write(struct cgroup *cont, struct cftype *cft,
@@ -950,18 +947,18 @@ static struct cftype mem_cgroup_files[] = {
950 { 947 {
951 .name = "usage_in_bytes", 948 .name = "usage_in_bytes",
952 .private = RES_USAGE, 949 .private = RES_USAGE,
953 .read = mem_cgroup_read, 950 .read_u64 = mem_cgroup_read,
954 }, 951 },
955 { 952 {
956 .name = "limit_in_bytes", 953 .name = "limit_in_bytes",
957 .private = RES_LIMIT, 954 .private = RES_LIMIT,
958 .write = mem_cgroup_write, 955 .write = mem_cgroup_write,
959 .read = mem_cgroup_read, 956 .read_u64 = mem_cgroup_read,
960 }, 957 },
961 { 958 {
962 .name = "failcnt", 959 .name = "failcnt",
963 .private = RES_FAILCNT, 960 .private = RES_FAILCNT,
964 .read = mem_cgroup_read, 961 .read_u64 = mem_cgroup_read,
965 }, 962 },
966 { 963 {
967 .name = "force_empty", 964 .name = "force_empty",