aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/originator.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2016-01-17 05:01:11 -0500
committerAntonio Quartulli <a@unstable.cc>2016-02-23 00:48:25 -0500
commit25bb250996eea422171ede0ada8814188dda8937 (patch)
tree055d2d5181e2d91970babbf063c5698d240fa225 /net/batman-adv/originator.c
parent82047ad7fecdc2d58bbeeb3872811b1c528fdf10 (diff)
batman-adv: Rename batadv_neigh_node *_free_ref function to *_put
The batman-adv source code is the only place in the kernel which uses the *_free_ref naming scheme for the *_put functions. Changing it to *_put makes it more consistent and makes it easier to understand the connection to the *_get functions. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
Diffstat (limited to 'net/batman-adv/originator.c')
-rw-r--r--net/batman-adv/originator.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 3e959f48f845..060f3a670d63 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -279,11 +279,11 @@ static void batadv_neigh_node_release(struct kref *ref)
279} 279}
280 280
281/** 281/**
282 * batadv_neigh_node_free_ref - decrement the neighbors refcounter and possibly 282 * batadv_neigh_node_put - decrement the neighbors refcounter and possibly
283 * release it 283 * release it
284 * @neigh_node: neigh neighbor to free 284 * @neigh_node: neigh neighbor to free
285 */ 285 */
286void batadv_neigh_node_free_ref(struct batadv_neigh_node *neigh_node) 286void batadv_neigh_node_put(struct batadv_neigh_node *neigh_node)
287{ 287{
288 kref_put(&neigh_node->refcount, batadv_neigh_node_release); 288 kref_put(&neigh_node->refcount, batadv_neigh_node_release);
289} 289}
@@ -737,7 +737,7 @@ static void batadv_orig_ifinfo_release(struct kref *ref)
737 /* this is the last reference to this object */ 737 /* this is the last reference to this object */
738 router = rcu_dereference_protected(orig_ifinfo->router, true); 738 router = rcu_dereference_protected(orig_ifinfo->router, true);
739 if (router) 739 if (router)
740 batadv_neigh_node_free_ref(router); 740 batadv_neigh_node_put(router);
741 741
742 kfree_rcu(orig_ifinfo, rcu); 742 kfree_rcu(orig_ifinfo, rcu);
743} 743}
@@ -793,7 +793,7 @@ static void batadv_orig_node_release(struct kref *ref)
793 hlist_for_each_entry_safe(neigh_node, node_tmp, 793 hlist_for_each_entry_safe(neigh_node, node_tmp,
794 &orig_node->neigh_list, list) { 794 &orig_node->neigh_list, list) {
795 hlist_del_rcu(&neigh_node->list); 795 hlist_del_rcu(&neigh_node->list);
796 batadv_neigh_node_free_ref(neigh_node); 796 batadv_neigh_node_put(neigh_node);
797 } 797 }
798 798
799 hlist_for_each_entry_safe(orig_ifinfo, node_tmp, 799 hlist_for_each_entry_safe(orig_ifinfo, node_tmp,
@@ -1069,7 +1069,7 @@ batadv_purge_orig_neighbors(struct batadv_priv *bat_priv,
1069 neigh_purged = true; 1069 neigh_purged = true;
1070 1070
1071 hlist_del_rcu(&neigh_node->list); 1071 hlist_del_rcu(&neigh_node->list);
1072 batadv_neigh_node_free_ref(neigh_node); 1072 batadv_neigh_node_put(neigh_node);
1073 } else { 1073 } else {
1074 /* only necessary if not the whole neighbor is to be 1074 /* only necessary if not the whole neighbor is to be
1075 * deleted, but some interface has been removed. 1075 * deleted, but some interface has been removed.
@@ -1108,7 +1108,7 @@ batadv_find_best_neighbor(struct batadv_priv *bat_priv,
1108 continue; 1108 continue;
1109 1109
1110 if (best) 1110 if (best)
1111 batadv_neigh_node_free_ref(best); 1111 batadv_neigh_node_put(best);
1112 1112
1113 best = neigh; 1113 best = neigh;
1114 } 1114 }
@@ -1154,7 +1154,7 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv,
1154 batadv_update_route(bat_priv, orig_node, BATADV_IF_DEFAULT, 1154 batadv_update_route(bat_priv, orig_node, BATADV_IF_DEFAULT,
1155 best_neigh_node); 1155 best_neigh_node);
1156 if (best_neigh_node) 1156 if (best_neigh_node)
1157 batadv_neigh_node_free_ref(best_neigh_node); 1157 batadv_neigh_node_put(best_neigh_node);
1158 1158
1159 /* ... then for all other interfaces. */ 1159 /* ... then for all other interfaces. */
1160 rcu_read_lock(); 1160 rcu_read_lock();
@@ -1171,7 +1171,7 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv,
1171 batadv_update_route(bat_priv, orig_node, hard_iface, 1171 batadv_update_route(bat_priv, orig_node, hard_iface,
1172 best_neigh_node); 1172 best_neigh_node);
1173 if (best_neigh_node) 1173 if (best_neigh_node)
1174 batadv_neigh_node_free_ref(best_neigh_node); 1174 batadv_neigh_node_put(best_neigh_node);
1175 } 1175 }
1176 rcu_read_unlock(); 1176 rcu_read_unlock();
1177 1177