diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-04-02 16:57:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 19:04:57 -0700 |
commit | 010cfac4ca0f9e85f54ba2117a372e72f4fb9a60 (patch) | |
tree | 47b8ed65b2e3cdfe269794545995020947a667a6 /kernel/utsname.c | |
parent | 3b6766fe668b83c8a03c6ed01bcc2ac77cbae848 (diff) |
cpuset: avoid changing cpuset's mems when errno returned
When writing to cpuset.mems, cpuset has to update its mems_allowed before
calling update_tasks_nodemask(), but this function might return -ENOMEM.
To avoid this rare case, we allocate the memory before changing
mems_allowed, and then pass to update_tasks_nodemask(). Similar to what
update_cpumask() does.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/utsname.c')
0 files changed, 0 insertions, 0 deletions