* Re: [PATCH 25/36] net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu()
[not found] <4D82DA6D.7030100@cn.fujitsu.com>
@ 2011-03-18 19:37 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-03-18 19:37 UTC (permalink / raw)
To: laijs
Cc: paulmck, mingo, kaber, netfilter-devel, netfilter, coreteam,
netdev, linux-kernel
From: Lai Jiangshan <laijs@cn.fujitsu.com>
Date: Fri, 18 Mar 2011 12:07:09 +0800
>
>
> The rcu callback __nf_ct_ext_free_rcu() just calls a kfree(),
> so we use kfree_rcu() instead of the call_rcu(__nf_ct_ext_free_rcu).
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 25/36] net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu()
@ 2011-03-18 4:07 Lai Jiangshan
0 siblings, 0 replies; 2+ messages in thread
From: Lai Jiangshan @ 2011-03-18 4:07 UTC (permalink / raw)
To: Paul E. McKenney, Ingo Molnar, Patrick McHardy, David S. Miller,
netfilter-devel
The rcu callback __nf_ct_ext_free_rcu() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(__nf_ct_ext_free_rcu).
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
net/netfilter/nf_conntrack_extend.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
index bd82450..cc0bcda 100644
--- a/net/netfilter/nf_conntrack_extend.c
+++ b/net/netfilter/nf_conntrack_extend.c
@@ -68,12 +68,6 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp)
return (void *)(*ext) + off;
}
-static void __nf_ct_ext_free_rcu(struct rcu_head *head)
-{
- struct nf_ct_ext *ext = container_of(head, struct nf_ct_ext, rcu);
- kfree(ext);
-}
-
void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
{
struct nf_ct_ext *old, *new;
@@ -114,7 +108,7 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
(void *)old + old->offset[i]);
rcu_read_unlock();
}
- call_rcu(&old->rcu, __nf_ct_ext_free_rcu);
+ kfree_rcu(old, rcu);
ct->ext = new;
}
--
1.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-18 19:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4D82DA6D.7030100@cn.fujitsu.com>
2011-03-18 19:37 ` [PATCH 25/36] net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu() David Miller
2011-03-18 4:07 Lai Jiangshan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).