[PATCH] cpuset crapectomy

Switched cpuset_common_file_read() to simple_read_from_buffer(), killed
a bunch of useless (and not quite correct - e.g. min(size_t,ssize_t))
code.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Al Viro and committed by Linus Torvalds eacaa1f5 46d7031e

+1 -11
+1 -11
kernel/cpuset.c
··· 968 968 char *page; 969 969 ssize_t retval = 0; 970 970 char *s; 971 - char *start; 972 - ssize_t n; 973 971 974 972 if (!(page = (char *)__get_free_page(GFP_KERNEL))) 975 973 return -ENOMEM; ··· 997 999 *s++ = '\n'; 998 1000 *s = '\0'; 999 1001 1000 - start = page + *ppos; 1001 - n = s - start; 1002 - 1003 - /* Do nothing if *ppos is at the eof or beyond the eof. */ 1004 - if (n <= 0) 1005 - goto out; 1006 - 1007 - retval = n - copy_to_user(buf, start, min(n, nbytes)); 1008 - *ppos += retval; 1002 + retval = simple_read_from_buffer(buf, nbytes, ppos, page, s - page); 1009 1003 out: 1010 1004 free_page((unsigned long)page); 1011 1005 return retval;