lkml.org 
[lkml]   [2008]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + workqueue-proper-error-unwinding-in-cpu-hotplug-error-path.patch added to -mm tree
On 07/22, Akinobu Mita wrote:
>
> On Tue, Jul 22, 2008 at 01:16:36PM +0400, Oleg Nesterov wrote:
>
> > Can't we simplify the fix? I don't like the fact that the CPU_UP_CANCELED
> > logic is duplicated.
> >
> > What do you think about the patch below?
>
> Yes, it is no duplication. But the goto usage in this patch looks bit
> tricky to me.

Well, the kernel is full of "goto again" / "goto retry". Not that I
claim this patch improves the readability ;)

But the duplication is really bad, imho.

> Maybe it is better to factor out the list_for_each() block.

Not sure I understand... do you mean add another function which
starts with list_for_each_entry ? This is not necessary, instead
of goto we can just do

workqueue_cpu_callback(CPU_UP_CANCELED);
return NOTIFY_BAD;

, in that case the patch will be one-liner.

Akinobu, Andrew, I'd suggest to drop

workqueue-proper-error-unwinding-in-cpu-hotplug-error-path.patch

, I'll send the new patch. If nothing else, it is simpler.

Oleg.



\
 
 \ /
  Last update: 2008-07-22 12:23    [W:0.034 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site