summaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2007-05-09 02:33:33 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 12:30:49 -0700
commit85badbdf5120d246ce2bb3f1a7689a805f9c9006 (patch)
tree0c406f24c1533dc8dcaf322751b05e7b8bcd5d23 /kernel/cpuset.c
parent92f4c701aad794de9e4cf7341d0a486aed027c46 (diff)
downloadop-kernel-dev-85badbdf5120d246ce2bb3f1a7689a805f9c9006.zip
op-kernel-dev-85badbdf5120d246ce2bb3f1a7689a805f9c9006.tar.gz
use simple_read_from_buffer in kernel/
Cleanup using simple_read_from_buffer() for /dev/cpuset/tasks and /proc/config.gz. Cc: Paul Jackson <pj@sgi.com> Cc: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 88b416d..f57854b 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1772,12 +1772,7 @@ static ssize_t cpuset_tasks_read(struct file *file, char __user *buf,
{
struct ctr_struct *ctr = file->private_data;
- if (*ppos + nbytes > ctr->bufsz)
- nbytes = ctr->bufsz - *ppos;
- if (copy_to_user(buf, ctr->buf + *ppos, nbytes))
- return -EFAULT;
- *ppos += nbytes;
- return nbytes;
+ return simple_read_from_buffer(buf, nbytes, ppos, ctr->buf, ctr->bufsz);
}
static int cpuset_tasks_release(struct inode *unused_inode, struct file *file)
OpenPOWER on IntegriCloud