Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97808
b: refs/heads/master
c: 3734074
h: refs/heads/master
v: v3
  • Loading branch information
Lai Jiangshan authored and Linus Torvalds committed Jun 6, 2008
1 parent 74aaf57 commit 6cb78b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aae8679b0ebcaa92f99c1c3cb0cd651594a43915
refs/heads/master: 37340746a66e5e7feed5945f28cb75d90a8fd9f6
10 changes: 7 additions & 3 deletions trunk/kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,10 @@ static int update_cpumask(struct cpuset *cs, char *buf)
retval = cpulist_parse(buf, trialcs.cpus_allowed);
if (retval < 0)
return retval;

if (!cpus_subset(trialcs.cpus_allowed, cpu_online_map))
return -EINVAL;
}
cpus_and(trialcs.cpus_allowed, trialcs.cpus_allowed, cpu_online_map);
retval = validate_change(cs, &trialcs);
if (retval < 0)
return retval;
Expand Down Expand Up @@ -932,9 +934,11 @@ static int update_nodemask(struct cpuset *cs, char *buf)
retval = nodelist_parse(buf, trialcs.mems_allowed);
if (retval < 0)
goto done;

if (!nodes_subset(trialcs.mems_allowed,
node_states[N_HIGH_MEMORY]))
return -EINVAL;
}
nodes_and(trialcs.mems_allowed, trialcs.mems_allowed,
node_states[N_HIGH_MEMORY]);
oldmem = cs->mems_allowed;
if (nodes_equal(oldmem, trialcs.mems_allowed)) {
retval = 0; /* Too easy - nothing to do */
Expand Down

0 comments on commit 6cb78b8

Please sign in to comment.