cpuset: fix unchecked calls to NODEMASK_ALLOC()
commitee24d3797780eee6ffe581a7b78d27896f9b494a
authorLi Zefan <lizf@cn.fujitsu.com>
Wed, 23 Mar 2011 23:42:47 +0000 (23 16:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2011 02:46:35 +0000 (23 19:46 -0700)
tree8034dac124ab8f0a29bc6f238c030915b2e08398
parentc8163ca8afcac0fc54593fc60d1e1110edbd0eb2
cpuset: fix unchecked calls to NODEMASK_ALLOC()

Those functions that use NODEMASK_ALLOC() can't propagate errno
to users, but will fail silently.

Fix it by using a static nodemask_t variable for each function, and
those variables are protected by cgroup_mutex;

[akpm@linux-foundation.org: fix comment spelling, strengthen cgroup_lock comment]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cpuset.c