Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16903
b: refs/heads/master
c: 59dac16
h: refs/heads/master
i:
  16901: a057017
  16899: 4614fb1
  16895: a85d3e6
v: v3
  • Loading branch information
Paul Jackson authored and Linus Torvalds committed Jan 9, 2006
1 parent 4a56cf2 commit 2c6707d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 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: c5b2aff89635495064592dc90da595f8a880ee87
refs/heads/master: 59dac16fb95f09253b8086134443abeb439703cd
25 changes: 15 additions & 10 deletions trunk/kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,18 +799,23 @@ static int update_nodemask(struct cpuset *cs, char *buf)
trialcs = *cs;
retval = nodelist_parse(buf, trialcs.mems_allowed);
if (retval < 0)
return retval;
goto done;
nodes_and(trialcs.mems_allowed, trialcs.mems_allowed, node_online_map);
if (nodes_empty(trialcs.mems_allowed))
return -ENOSPC;
retval = validate_change(cs, &trialcs);
if (retval == 0) {
down(&callback_sem);
cs->mems_allowed = trialcs.mems_allowed;
atomic_inc(&cpuset_mems_generation);
cs->mems_generation = atomic_read(&cpuset_mems_generation);
up(&callback_sem);
if (nodes_empty(trialcs.mems_allowed)) {
retval = -ENOSPC;
goto done;
}
retval = validate_change(cs, &trialcs);
if (retval < 0)
goto done;

down(&callback_sem);
cs->mems_allowed = trialcs.mems_allowed;
atomic_inc(&cpuset_mems_generation);
cs->mems_generation = atomic_read(&cpuset_mems_generation);
up(&callback_sem);

done:
return retval;
}

Expand Down

0 comments on commit 2c6707d

Please sign in to comment.