aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorPaul Menage <menage@google.com>2008-04-29 03:59:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:07 -0400
commitf4c753b7eacc277e506066abdda351cbc1cf8e6a (patch)
tree2510264d4fac836dc64acd700846a5fe8d960b1e /kernel/cgroup.c
parent3ff31d0cca38b3c20e88a022bf38c4f7c98492f0 (diff)
CGroup API files: rename read/write_uint methods to read_write_u64
Several people have justifiably complained that the "_uint" suffix is inappropriate for functions that handle u64 values, so this patch just renames all these functions and their users to have the suffic _u64. [peterz@infradead.org: build fix] Signed-off-by: Paul Menage <menage@google.com> Cc: "Li Zefan" <lizf@cn.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Paul Jackson <pj@sgi.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: "YAMAMOTO Takashi" <yamamoto@valinux.co.jp> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 068f58da855a..0bd79a81666a 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1311,10 +1311,10 @@ enum cgroup_filetype {
1311 FILE_RELEASE_AGENT, 1311 FILE_RELEASE_AGENT,
1312}; 1312};
1313 1313
1314static ssize_t cgroup_write_uint(struct cgroup *cgrp, struct cftype *cft, 1314static ssize_t cgroup_write_u64(struct cgroup *cgrp, struct cftype *cft,
1315 struct file *file, 1315 struct file *file,
1316 const char __user *userbuf, 1316 const char __user *userbuf,
1317 size_t nbytes, loff_t *unused_ppos) 1317 size_t nbytes, loff_t *unused_ppos)
1318{ 1318{
1319 char buffer[64]; 1319 char buffer[64];
1320 int retval = 0; 1320 int retval = 0;
@@ -1338,7 +1338,7 @@ static ssize_t cgroup_write_uint(struct cgroup *cgrp, struct cftype *cft,
1338 return -EINVAL; 1338 return -EINVAL;
1339 1339
1340 /* Pass to subsystem */ 1340 /* Pass to subsystem */
1341 retval = cft->write_uint(cgrp, cft, val); 1341 retval = cft->write_u64(cgrp, cft, val);
1342 if (!retval) 1342 if (!retval)
1343 retval = nbytes; 1343 retval = nbytes;
1344 return retval; 1344 return retval;
@@ -1419,18 +1419,18 @@ static ssize_t cgroup_file_write(struct file *file, const char __user *buf,
1419 return -ENODEV; 1419 return -ENODEV;
1420 if (cft->write) 1420 if (cft->write)
1421 return cft->write(cgrp, cft, file, buf, nbytes, ppos); 1421 return cft->write(cgrp, cft, file, buf, nbytes, ppos);
1422 if (cft->write_uint) 1422 if (cft->write_u64)
1423 return cgroup_write_uint(cgrp, cft, file, buf, nbytes, ppos); 1423 return cgroup_write_u64(cgrp, cft, file, buf, nbytes, ppos);
1424 return -EINVAL; 1424 return -EINVAL;
1425} 1425}
1426 1426
1427static ssize_t cgroup_read_uint(struct cgroup *cgrp, struct cftype *cft, 1427static ssize_t cgroup_read_u64(struct cgroup *cgrp, struct cftype *cft,
1428 struct file *file, 1428 struct file *file,
1429 char __user *buf, size_t nbytes, 1429 char __user *buf, size_t nbytes,
1430 loff_t *ppos) 1430 loff_t *ppos)
1431{ 1431{
1432 char tmp[64]; 1432 char tmp[64];
1433 u64 val = cft->read_uint(cgrp, cft); 1433 u64 val = cft->read_u64(cgrp, cft);
1434 int len = sprintf(tmp, "%llu\n", (unsigned long long) val); 1434 int len = sprintf(tmp, "%llu\n", (unsigned long long) val);
1435 1435
1436 return simple_read_from_buffer(buf, nbytes, ppos, tmp, len); 1436 return simple_read_from_buffer(buf, nbytes, ppos, tmp, len);
@@ -1490,8 +1490,8 @@ static ssize_t cgroup_file_read(struct file *file, char __user *buf,
1490 1490
1491 if (cft->read) 1491 if (cft->read)
1492 return cft->read(cgrp, cft, file, buf, nbytes, ppos); 1492 return cft->read(cgrp, cft, file, buf, nbytes, ppos);
1493 if (cft->read_uint) 1493 if (cft->read_u64)
1494 return cgroup_read_uint(cgrp, cft, file, buf, nbytes, ppos); 1494 return cgroup_read_u64(cgrp, cft, file, buf, nbytes, ppos);
1495 return -EINVAL; 1495 return -EINVAL;
1496} 1496}
1497 1497
@@ -2158,14 +2158,14 @@ static struct cftype files[] = {
2158 2158
2159 { 2159 {
2160 .name = "notify_on_release", 2160 .name = "notify_on_release",
2161 .read_uint = cgroup_read_notify_on_release, 2161 .read_u64 = cgroup_read_notify_on_release,
2162 .write = cgroup_common_file_write, 2162 .write = cgroup_common_file_write,
2163 .private = FILE_NOTIFY_ON_RELEASE, 2163 .private = FILE_NOTIFY_ON_RELEASE,
2164 }, 2164 },
2165 2165
2166 { 2166 {
2167 .name = "releasable", 2167 .name = "releasable",
2168 .read_uint = cgroup_read_releasable, 2168 .read_u64 = cgroup_read_releasable,
2169 .private = FILE_RELEASABLE, 2169 .private = FILE_RELEASABLE,
2170 } 2170 }
2171}; 2171};