Commit 11c476f3 authored by Paul E. McKenney's avatar Paul E. McKenney

net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfree

The RCU callback prl_entry_destroy_rcu() just calls kfree(), so we can
use kfree_rcu() instead of call_rcu().
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
parent 8e3572cf
...@@ -401,11 +401,6 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg) ...@@ -401,11 +401,6 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg)
return err; 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) static void prl_list_destroy_rcu(struct rcu_head *head)
{ {
struct ip_tunnel_prl_entry *p, *n; struct ip_tunnel_prl_entry *p, *n;
...@@ -433,7 +428,7 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a) ...@@ -433,7 +428,7 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
p = &x->next) { p = &x->next) {
if (x->addr == a->addr) { if (x->addr == a->addr) {
*p = x->next; *p = x->next;
call_rcu(&x->rcu_head, prl_entry_destroy_rcu); kfree_rcu(x, rcu_head);
t->prl_count--; t->prl_count--;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment