lkml.org 
[lkml]   [2008]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.6 patch] fs/block_dev.c:I_BDEV() mustn't be inline
On Mon, Apr 28, 2008 at 05:41:11PM -0700, Linus Torvalds wrote:

> 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.

AFAICS, it's a gcc bug. We have
extern struct block_device *I_BDEV(struct inode *inode);
followed by
inline struct block_device *I_BDEV(struct inode *inode)
{
...
}

and presence of declaration with extern within the same translation unit
means that definition we have here is an external one, per 6.7.4. It's
perfectly legitimate and gcc has no business complaining about inline
here; moreover, example in 6.7.4(7) is essentially the same thing...


\
 
 \ /
  Last update: 2008-04-29 03:15    [W:0.109 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site