[PATCH tip/core/rcu 6/7] net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfree

From: Paul E. McKenney
Date: Mon May 02 2011 - 17:41:28 EST


The RCU callback prl_entry_destroy_rcu() just calls kfree(), so we can
use kfree_rcu() instead of call_rcu().

Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
Cc: "Pekka Savola (ipv6)" <pekkas@xxxxxxxxxx>
Cc: James Morris <jmorris@xxxxxxxxx>
Cc: Hideaki YOSHIFUJI <yoshfuji@xxxxxxxxxxxxxx>
Cc: Patrick McHardy <kaber@xxxxxxxxx>
---
net/ipv6/sit.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 43b3337..5f35d59 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -401,11 +401,6 @@ out:
return err;
}

-static void prl_entry_destroy_rcu(struct rcu_head *head)
-{
- kfree(container_of(head, struct ip_tunnel_prl_entry, rcu_head));
-}
-
static void prl_list_destroy_rcu(struct rcu_head *head)
{
struct ip_tunnel_prl_entry *p, *n;
@@ -433,7 +428,7 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
p = &x->next) {
if (x->addr == a->addr) {
*p = x->next;
- call_rcu(&x->rcu_head, prl_entry_destroy_rcu);
+ kfree_rcu(x, rcu_head);
t->prl_count--;
goto out;
}
--
1.7.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/