From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756004AbYD2BMY (ORCPT ); Mon, 28 Apr 2008 21:12:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752966AbYD2BMQ (ORCPT ); Mon, 28 Apr 2008 21:12:16 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:57710 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326AbYD2BMQ (ORCPT ); Mon, 28 Apr 2008 21:12:16 -0400 Date: Tue, 29 Apr 2008 02:12:02 +0100 From: Al Viro To: Linus Torvalds Cc: Adrian Bunk , Ingo Molnar , Linux Kernel Mailing List , Andrew Morton , Thomas Gleixner , "H. Peter Anvin" , Alexander van Heukelum , jdike@addtoit.com Subject: Re: [2.6 patch] fs/block_dev.c:I_BDEV() mustn't be inline Message-ID: <20080429011202.GH5882@ZenIV.linux.org.uk> References: <20080424215739.GA32378@elte.hu> <20080426151516.GA27894@elte.hu> <20080426172222.GD17345@elte.hu> <20080428153831.GC2813@cs181133002.pp.htv.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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...