aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 6a6e87b2f2fd..28176d083f7b 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;
@@ -1680,7 +1670,7 @@ static const struct cpuset *nearest_exclusive_ancestor(const struct cpuset *cs)
1680 * GFP_USER - only nodes in current tasks mems allowed ok. 1670 * GFP_USER - only nodes in current tasks mems allowed ok.
1681 **/ 1671 **/
1682 1672
1683int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask) 1673int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
1684{ 1674{
1685 int node; /* node that zone z is on */ 1675 int node; /* node that zone z is on */
1686 const struct cpuset *cs; /* current cpuset ancestors */ 1676 const struct cpuset *cs; /* current cpuset ancestors */