Messages in this thread | | | Date | Thu, 4 Sep 2008 10:49:09 -0700 | From | "Paul Menage" <> | Subject | Re: [PATCH] cpuset: avoid changing cpuset's cpus when -errno returned |
| |
On Wed, Sep 3, 2008 at 12:33 AM, Li Zefan <lizf@cn.fujitsu.com> wrote: > 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' returns failure but 'cpus' > has been changed, because cpus was changed before calling heap_init() which > may return -ENOMEM.
Since neither of the callers of update_tasks_cpumask() check the return value (one knows it's going to be 0, the other doesn't care about errors) I think it would be better to just make it a void function.
Paul
| |