]> git.baikalelectronics.ru Git - kernel.git/commit
cpuset: avoid changing cpuset's cpus when -errno returned
authorLi Zefan <lizf@cn.fujitsu.com>
Sat, 13 Sep 2008 09:33:08 +0000 (02:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Sep 2008 21:41:50 +0000 (14:41 -0700)
commit504402e0ade6650a13fb8fcbdb94d805c8037c63
tree0903456d2aced7e2e9534b3b3d1c5f58e1056b53
parent0cd9208fc8822d2fd2bb637845c37d623f4878f8
cpuset: avoid changing cpuset's cpus when -errno returned

After the patch:

commit eff2b52e365d0081a22943834018356f20c6b5f8
Author: Miao Xie <miaox@cn.fujitsu.com>
Date:   Fri Jul 25 01:47:21 2008 -0700

    cpusets: restructure the function update_cpumask() and update_nodemask()

It might happen that 'echo 0 > /cpuset/sub/cpus' returned failure but 'cpus'
has been changed, because cpus was changed before calling heap_init() which
may return -ENOMEM.

This patch restores the orginal behavior.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Cc: Paul Jackson <pj@sgi.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