]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/batman-adv/routing.c
Merge tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh
[karo-tx-linux.git] / net / batman-adv / routing.c
index a14ca42e927eae6e2ea28aba27619b08372bba6e..4dd646a52f1a16ca297a3cdb1abeff56206df166 100644 (file)
@@ -98,7 +98,7 @@ static void _batadv_update_route(struct batadv_priv *bat_priv,
        }
 
        if (curr_router)
-               batadv_neigh_node_free_ref(curr_router);
+               batadv_neigh_node_put(curr_router);
 
        /* increase refcount of new best neighbor */
        if (neigh_node && !kref_get_unless_zero(&neigh_node->refcount))
@@ -107,11 +107,11 @@ static void _batadv_update_route(struct batadv_priv *bat_priv,
        spin_lock_bh(&orig_node->neigh_list_lock);
        rcu_assign_pointer(orig_ifinfo->router, neigh_node);
        spin_unlock_bh(&orig_node->neigh_list_lock);
-       batadv_orig_ifinfo_free_ref(orig_ifinfo);
+       batadv_orig_ifinfo_put(orig_ifinfo);
 
        /* decrease refcount of previous best neighbor */
        if (curr_router)
-               batadv_neigh_node_free_ref(curr_router);
+               batadv_neigh_node_put(curr_router);
 }
 
 /**
@@ -138,7 +138,7 @@ void batadv_update_route(struct batadv_priv *bat_priv,
 
 out:
        if (router)
-               batadv_neigh_node_free_ref(router);
+               batadv_neigh_node_put(router);
 }
 
 /**
@@ -545,16 +545,16 @@ batadv_find_router(struct batadv_priv *bat_priv,
 next:
                /* free references */
                if (cand_router) {
-                       batadv_neigh_node_free_ref(cand_router);
+                       batadv_neigh_node_put(cand_router);
                        cand_router = NULL;
                }
-               batadv_orig_ifinfo_free_ref(cand);
+               batadv_orig_ifinfo_put(cand);
        }
        rcu_read_unlock();
 
        /* last_bonding_candidate is reset below, remove the old reference. */
        if (orig_node->last_bonding_candidate)
-               batadv_orig_ifinfo_free_ref(orig_node->last_bonding_candidate);
+               batadv_orig_ifinfo_put(orig_node->last_bonding_candidate);
 
        /* After finding candidates, handle the three cases:
         * 1) there is a next candidate, use that
@@ -562,17 +562,17 @@ next:
         * 3) there is no candidate at all, return the default router
         */
        if (next_candidate) {
-               batadv_neigh_node_free_ref(router);
+               batadv_neigh_node_put(router);
 
                /* remove references to first candidate, we don't need it. */
                if (first_candidate) {
-                       batadv_neigh_node_free_ref(first_candidate_router);
-                       batadv_orig_ifinfo_free_ref(first_candidate);
+                       batadv_neigh_node_put(first_candidate_router);
+                       batadv_orig_ifinfo_put(first_candidate);
                }
                router = next_candidate_router;
                orig_node->last_bonding_candidate = next_candidate;
        } else if (first_candidate) {
-               batadv_neigh_node_free_ref(router);
+               batadv_neigh_node_put(router);
 
                /* refcounting has already been done in the loop above. */
                router = first_candidate_router;