Skip to contentSkip to conversation

Replaces two GOTO statements with one IF_ELSE statement in /fs/open.c

PATCH Andi Kleen 1 participant 1 message Jun 21, 2005 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.62.0506201834460.5008@localhost.localdomain.suse.lists.linux.kernel

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.62.0506201154300.2245@graphe.net.suse.lists.linux.kernel

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#4 lore raw
Quoted 4 lines · Andrew Morton

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)