aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/cpuset.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 6a6e87b2f2fd..45a5719a0104 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -968,8 +968,6 @@ static ssize_t cpuset_common_file_read(struct file *file, char __user *buf,
968 char *page; 968 char *page;
969 ssize_t retval = 0; 969 ssize_t retval = 0;
970 char *s; 970 char *s;
971 char *start;
972 ssize_t n;
973 971
974 if (!(page = (char *)__get_free_page(GFP_KERNEL))) 972 if (!(page = (char *)__get_free_page(GFP_KERNEL)))
975 return -ENOMEM; 973 return -ENOMEM;
@@ -999,15 +997,7 @@ static ssize_t cpuset_common_file_read(struct file *file, char __user *buf,
999 *s++ = '\n'; 997 *s++ = '\n';
1000 *s = '\0'; 998 *s = '\0';
1001 999
1002 start = page + *ppos; 1000 retval = simple_read_from_buffer(buf, nbytes, ppos, page, s - page);
1003 n = s - start;
1004
1005 /* Do nothing if *ppos is at the eof or beyond the eof. */
1006 if (n <= 0)
1007 goto out;
1008
1009 retval = n - copy_to_user(buf, start, min(n, nbytes));
1010 *ppos += retval;
1011out: 1001out:
1012 free_page((unsigned long)page); 1002 free_page((unsigned long)page);
1013 return retval; 1003 return retval;