diff options
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r-- | kernel/cpuset.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 88b416dfbc72..f57854b08922 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, | |||
1772 | { | 1772 | { |
1773 | struct ctr_struct *ctr = file->private_data; | 1773 | struct ctr_struct *ctr = file->private_data; |
1774 | 1774 | ||
1775 | if (*ppos + nbytes > ctr->bufsz) | 1775 | return simple_read_from_buffer(buf, nbytes, ppos, ctr->buf, ctr->bufsz); |
1776 | nbytes = ctr->bufsz - *ppos; | ||
1777 | if (copy_to_user(buf, ctr->buf + *ppos, nbytes)) | ||
1778 | return -EFAULT; | ||
1779 | *ppos += nbytes; | ||
1780 | return nbytes; | ||
1781 | } | 1776 | } |
1782 | 1777 | ||
1783 | static int cpuset_tasks_release(struct inode *unused_inode, struct file *file) | 1778 | static int cpuset_tasks_release(struct inode *unused_inode, struct file *file) |