diff options
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/gateway_client.c | 10 | ||||
-rw-r--r-- | net/batman-adv/originator.c | 10 | ||||
-rw-r--r-- | net/batman-adv/soft-interface.c | 10 |
3 files changed, 3 insertions, 27 deletions
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c index 65f39530799..61605a0f3f3 100644 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c @@ -29,18 +29,10 @@ #include <linux/udp.h> #include <linux/if_vlan.h> -static void gw_node_free_rcu(struct rcu_head *rcu) -{ - struct gw_node *gw_node; - - gw_node = container_of(rcu, struct gw_node, rcu); - kfree(gw_node); -} - static void gw_node_free_ref(struct gw_node *gw_node) { if (atomic_dec_and_test(&gw_node->refcount)) - call_rcu(&gw_node->rcu, gw_node_free_rcu); + kfree_rcu(gw_node, rcu); } static struct gw_node *gw_get_selected_gw_node(struct bat_priv *bat_priv) diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 080ec88330a..40a30bbcd14 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c @@ -54,18 +54,10 @@ err: return 0; } -static void neigh_node_free_rcu(struct rcu_head *rcu) -{ - struct neigh_node *neigh_node; - - neigh_node = container_of(rcu, struct neigh_node, rcu); - kfree(neigh_node); -} - void neigh_node_free_ref(struct neigh_node *neigh_node) { if (atomic_dec_and_test(&neigh_node->refcount)) - call_rcu(&neigh_node->rcu, neigh_node_free_rcu); + kfree_rcu(neigh_node, rcu); } /* increases the refcounter of a found router */ diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index c76a33eeb3f..d5aa60999e8 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -72,18 +72,10 @@ int my_skb_head_push(struct sk_buff *skb, unsigned int len) return 0; } -static void softif_neigh_free_rcu(struct rcu_head *rcu) -{ - struct softif_neigh *softif_neigh; - - softif_neigh = container_of(rcu, struct softif_neigh, rcu); - kfree(softif_neigh); -} - static void softif_neigh_free_ref(struct softif_neigh *softif_neigh) { if (atomic_dec_and_test(&softif_neigh->refcount)) - call_rcu(&softif_neigh->rcu, softif_neigh_free_rcu); + kfree_rcu(softif_neigh, rcu); } static void softif_neigh_vid_free_rcu(struct rcu_head *rcu) |