Re: [PATCH] cpuset: avoid changing cpuset's cpus when -errno returned
From: Paul Menage
Date: Thu Sep 04 2008 - 13:50:21 EST
On Wed, Sep 3, 2008 at 12:33 AM, Li Zefan <lizf@xxxxxxxxxxxxxx> wrote:
> After the patch:
>
> commit 0b2f630a28d53b5a2082a5275bc3334b10373508
> Author: Miao Xie <miaox@xxxxxxxxxxxxxx>
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/