Re: [PATCH] Replaces two GOTO statements with one IF_ELSE statement in /fs/open.c

From: Andi Kleen
Date: Tue Jun 21 2005 - 06:55:11 EST


Andrew Morton <akpm@xxxxxxxx> writes:
>
> The old trick to make the error-handling code out-of-line shouldn't be
> needed nowadays - IS_ERR uses unlikely(), which is supposed to handle that
> stuff.

In fact it doesn't even work anymore with -freorder-blocks (which is
default on i386). Without unlikely gcc 3.3/3.4 will happily move the out of
line block back. I was told that newer gcc gives a bit more value
to user gotos, but it doesn't help on the older compilers.

-Andi (who also thinks there are too many gotos in the kernel and
many should be cleaned up)
-
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/