Re: [2.6 patch] fs/block_dev.c:I_BDEV() mustn't be inline

From: Linus Torvalds
Date: Mon Apr 28 2008 - 20:42:06 EST




On Mon, 28 Apr 2008, Adrian Bunk wrote:
>
> This patch fixes the following build error with UML and gcc 4.3:

I'm not going to apply these before I understand what the breakage is all
about.

> -inline struct block_device *I_BDEV(struct inode *inode)
> +struct block_device *I_BDEV(struct inode *inode)
> {
> return &BDEV_I(inode)->bdev;
> }

There is NO WAY IN HELL this function shouldn't be inlined, and it doesn't
matter a whit if some users outside of this file then also want the
non-inlined version.

The whole setup should result in a single offset-of from the inode, ie
we're talking something that normally generates no code at all when
inlined (because the offset will be subsumed into whatever actually uses
the result).

So just removing the inline is simply not acceptable any more, since it
just implies total and utter breakage of the compiler. At some point you
just have to say: "That is sh*t", and not take it any more.

What is UML doing to trigger this?

Or should be just tell people that gcc-4.3 is unusable crap?

Linus
--
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/