[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110323231948.GE13806@parisc-linux.org>
Date: Wed, 23 Mar 2011 17:19:49 -0600
From: Matthew Wilcox <matthew@....cx>
To: James Bottomley <James.Bottomley@...e.de>
Cc: paulmck@...ux.vnet.ibm.com, Robert Love <robert.w.love@...el.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Ingo Molnar <mingo@...e.hu>, Jens Axboe <axboe@...nel.dk>,
Neil Horman <nhorman@...driver.com>,
"David S. Miller" <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
"Pekka Savola (ipv6)" <pekkas@...core.fi>,
James Morris <jmorris@...ei.org>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Patrick McHardy <kaber@...sh.net>,
Eric Dumazet <eric.dumazet@...il.com>,
Stephen Hemminger <shemminger@...tta.com>,
Tejun Heo <tj@...nel.org>, Jarek Poplawski <jarkao2@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...n-fcoe.org" <devel@...n-fcoe.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 02/36] scsi,rcu: convert call_rcu(fc_rport_free_rcu) to
kfree_rcu()
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists