diff mbox

[05/23] batman-adv: Drop batadv_hardif_neigh_free_rcu

Message ID 1450222316-1764-5-git-send-email-sven@narfation.org
State Superseded, archived
Headers show

Commit Message

Sven Eckelmann Dec. 15, 2015, 11:31 p.m. UTC
The refactoring of the batadv_hardif_neigh_node reference counting
function converted batadv_hardif_neigh_free_rcu to basically kfree_rcu.
Drop it and just use kfree_rcu instead.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 net/batman-adv/originator.c | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)
diff mbox

Patch

diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 7735118..f39a715 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -209,28 +209,6 @@  void batadv_neigh_ifinfo_free_ref(struct batadv_neigh_ifinfo *neigh_ifinfo)
 }
 
 /**
- * batadv_hardif_neigh_free - remove unreferenced hardif neighbor
- * @hardif_neigh: hardif neigh neighbor to free
- */
-static void
-batadv_hardif_neigh_free(struct batadv_hardif_neigh_node *hardif_neigh)
-{
-	kfree(hardif_neigh);
-}
-
-/**
- * batadv_hardif_neigh_free_rcu - free the hardif neigh_node
- * @rcu: rcu pointer of the neigh_node
- */
-static void batadv_hardif_neigh_free_rcu(struct rcu_head *rcu)
-{
-	struct batadv_hardif_neigh_node *hardif_neigh;
-
-	hardif_neigh = container_of(rcu, struct batadv_hardif_neigh_node, rcu);
-	batadv_hardif_neigh_free(hardif_neigh);
-}
-
-/**
  * batadv_hardif_neigh_release - release hardif neigh node from lists and
  *  queue for free after rcu grace period
  * * @ref: kref pointer of the neigh_node
@@ -247,8 +225,7 @@  static void batadv_hardif_neigh_release(struct kref *ref)
 	spin_unlock_bh(&hardif_neigh->if_incoming->neigh_list_lock);
 
 	batadv_hardif_free_ref(hardif_neigh->if_incoming);
-
-	call_rcu(&hardif_neigh->rcu, batadv_hardif_neigh_free_rcu);
+	kfree_rcu(hardif_neigh, rcu);
 }
 
 /**