Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933349Ab1CWXTy (ORCPT ); Wed, 23 Mar 2011 19:19:54 -0400 Received: from palinux.external.hp.com ([192.25.206.14]:44826 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933247Ab1CWXTw (ORCPT ); Wed, 23 Mar 2011 19:19:52 -0400 Date: Wed, 23 Mar 2011 17:19:49 -0600 From: Matthew Wilcox To: James Bottomley Cc: paulmck@linux.vnet.ibm.com, Robert Love , Lai Jiangshan , Ingo Molnar , Jens Axboe , Neil Horman , "David S. Miller" , Alexey Kuznetsov , "Pekka Savola (ipv6)" , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Eric Dumazet , Stephen Hemminger , Tejun Heo , Jarek Poplawski , "linux-kernel@vger.kernel.org" , "devel@open-fcoe.org" , "linux-scsi@vger.kernel.org" , "netdev@vger.kernel.org" Subject: Re: [PATCH 02/36] scsi,rcu: convert call_rcu(fc_rport_free_rcu) to kfree_rcu() Message-ID: <20110323231948.GE13806@parisc-linux.org> References: <4D82D071.5020703@cn.fujitsu.com> <4D82D3FF.2080303@cn.fujitsu.com> <4D82D45A.30102@cn.fujitsu.com> <1300814913.19083.427.camel@fritz> <20110323065014.GU2322@linux.vnet.ibm.com> <1300889151.15899.4.camel@mulgrave.site> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1300889151.15899.4.camel@mulgrave.site> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1067 Lines: 26 On Wed, Mar 23, 2011 at 09:05:51AM -0500, James Bottomley wrote: > > #define kfree_rcu(ptr, rcu_head) \ > > __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) > > Isn't this one of those cases where the obvious use of the interface is > definitely wrong? But it's a compile time breakage if you use it wrong, not runtime. > It's also another nasty pseudo C prototype. I know we do this sort of > thing for container_of et al, but I don't really think we want to extend > it. We do it for list_entry, list_for_each_entry, etc. And those are very widespread within the kernel. -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/