]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/batman-adv/routing.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / net / batman-adv / routing.c
index d2c490df963b39af13142b1916572cfd490a0717..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);
 }
 
 /**
@@ -269,7 +269,7 @@ static int batadv_recv_my_icmp_packet(struct batadv_priv *bat_priv,
        }
 out:
        if (primary_if)
-               batadv_hardif_free_ref(primary_if);
+               batadv_hardif_put(primary_if);
        if (orig_node)
                batadv_orig_node_put(orig_node);
        return ret;
@@ -317,7 +317,7 @@ static int batadv_recv_icmp_ttl_exceeded(struct batadv_priv *bat_priv,
 
 out:
        if (primary_if)
-               batadv_hardif_free_ref(primary_if);
+               batadv_hardif_put(primary_if);
        if (orig_node)
                batadv_orig_node_put(orig_node);
        return ret;
@@ -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;
@@ -702,7 +702,7 @@ batadv_reroute_unicast_packet(struct batadv_priv *bat_priv,
        ret = true;
 out:
        if (primary_if)
-               batadv_hardif_free_ref(primary_if);
+               batadv_hardif_put(primary_if);
        if (orig_node)
                batadv_orig_node_put(orig_node);
 
@@ -808,7 +808,7 @@ static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv,
 
        ether_addr_copy(unicast_packet->dest, primary_if->net_dev->dev_addr);
 
-       batadv_hardif_free_ref(primary_if);
+       batadv_hardif_put(primary_if);
 
        unicast_packet->ttvn = curr_ttvn;