Messages in this thread | | | Date | Tue, 22 Jul 2008 14:23:54 +0400 | From | Oleg Nesterov <> | Subject | Re: + 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.
| |