]> err.no Git - linux-2.6/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)
commit4e74339af6a59c061cf02f1ac497766bca1de19a
tree0903456d2aced7e2e9534b3b3d1c5f58e1056b53
parentdea420ce0e2973e8ef1fd11fde6804c8d03a82ad
cpuset: avoid changing cpuset's cpus when -errno returned

After the patch:

commit 0b2f630a28d53b5a2082a5275bc3334b10373508
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