Skip to content

Commit

Permalink
net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfree
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Alexey Kuznetsov <[email protected]>
Cc: "Pekka Savola (ipv6)" <[email protected]>
Cc: James Morris <[email protected]>
Cc: Hideaki YOSHIFUJI <[email protected]>
Cc: Patrick McHardy <[email protected]>
Acked-by: David S. Miller <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
  • Loading branch information
paulmck committed May 8, 2011
1 parent 8e3572c commit 11c476f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,6 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg)
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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 11c476f

Please sign in to comment.