Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / net / batman-adv / originator.c
index eacd0e5a02381e2dfe53106b0ed76878888805d5..e4cbb0753e37ff6681a20e8912df1f4ad1e74a05 100644 (file)
@@ -151,11 +151,11 @@ static void batadv_orig_node_vlan_release(struct kref *ref)
 }
 
 /**
- * batadv_orig_node_vlan_free_ref - decrement the refcounter and possibly
- *  release the originator-vlan object
+ * batadv_orig_node_vlan_put - decrement the refcounter and possibly release
+ *  the originator-vlan object
  * @orig_vlan: the originator-vlan object to release
  */
-void batadv_orig_node_vlan_free_ref(struct batadv_orig_node_vlan *orig_vlan)
+void batadv_orig_node_vlan_put(struct batadv_orig_node_vlan *orig_vlan)
 {
        kref_put(&orig_vlan->refcount, batadv_orig_node_vlan_release);
 }
@@ -196,17 +196,17 @@ static void batadv_neigh_ifinfo_release(struct kref *ref)
        neigh_ifinfo = container_of(ref, struct batadv_neigh_ifinfo, refcount);
 
        if (neigh_ifinfo->if_outgoing != BATADV_IF_DEFAULT)
-               batadv_hardif_free_ref(neigh_ifinfo->if_outgoing);
+               batadv_hardif_put(neigh_ifinfo->if_outgoing);
 
        kfree_rcu(neigh_ifinfo, rcu);
 }
 
 /**
- * batadv_neigh_ifinfo_free_ref - decrement the refcounter and possibly release
+ * batadv_neigh_ifinfo_put - decrement the refcounter and possibly release
  *  the neigh_ifinfo
  * @neigh_ifinfo: the neigh_ifinfo object to release
  */
-void batadv_neigh_ifinfo_free_ref(struct batadv_neigh_ifinfo *neigh_ifinfo)
+void batadv_neigh_ifinfo_put(struct batadv_neigh_ifinfo *neigh_ifinfo)
 {
        kref_put(&neigh_ifinfo->refcount, batadv_neigh_ifinfo_release);
 }
@@ -227,16 +227,16 @@ static void batadv_hardif_neigh_release(struct kref *ref)
        hlist_del_init_rcu(&hardif_neigh->list);
        spin_unlock_bh(&hardif_neigh->if_incoming->neigh_list_lock);
 
-       batadv_hardif_free_ref(hardif_neigh->if_incoming);
+       batadv_hardif_put(hardif_neigh->if_incoming);
        kfree_rcu(hardif_neigh, rcu);
 }
 
 /**
- * batadv_hardif_neigh_free_ref - decrement the hardif neighbors refcounter
+ * batadv_hardif_neigh_put - decrement the hardif neighbors refcounter
  *  and possibly release it
  * @hardif_neigh: hardif neigh neighbor to free
  */
-void batadv_hardif_neigh_free_ref(struct batadv_hardif_neigh_node *hardif_neigh)
+void batadv_hardif_neigh_put(struct batadv_hardif_neigh_node *hardif_neigh)
 {
        kref_put(&hardif_neigh->refcount, batadv_hardif_neigh_release);
 }
@@ -259,31 +259,31 @@ static void batadv_neigh_node_release(struct kref *ref)
 
        hlist_for_each_entry_safe(neigh_ifinfo, node_tmp,
                                  &neigh_node->ifinfo_list, list) {
-               batadv_neigh_ifinfo_free_ref(neigh_ifinfo);
+               batadv_neigh_ifinfo_put(neigh_ifinfo);
        }
 
        hardif_neigh = batadv_hardif_neigh_get(neigh_node->if_incoming,
                                               neigh_node->addr);
        if (hardif_neigh) {
                /* batadv_hardif_neigh_get() increases refcount too */
-               batadv_hardif_neigh_free_ref(hardif_neigh);
-               batadv_hardif_neigh_free_ref(hardif_neigh);
+               batadv_hardif_neigh_put(hardif_neigh);
+               batadv_hardif_neigh_put(hardif_neigh);
        }
 
        if (bao->bat_neigh_free)
                bao->bat_neigh_free(neigh_node);
 
-       batadv_hardif_free_ref(neigh_node->if_incoming);
+       batadv_hardif_put(neigh_node->if_incoming);
 
        kfree_rcu(neigh_node, rcu);
 }
 
 /**
- * batadv_neigh_node_free_ref - decrement the neighbors refcounter and possibly
+ * batadv_neigh_node_put - decrement the neighbors refcounter and possibly
  *  release it
  * @neigh_node: neigh neighbor to free
  */
-void batadv_neigh_node_free_ref(struct batadv_neigh_node *neigh_node)
+void batadv_neigh_node_put(struct batadv_neigh_node *neigh_node)
 {
        kref_put(&neigh_node->refcount, batadv_neigh_node_release);
 }
@@ -544,7 +544,7 @@ batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface,
 
        hardif_neigh = kzalloc(sizeof(*hardif_neigh), GFP_ATOMIC);
        if (!hardif_neigh) {
-               batadv_hardif_free_ref(hard_iface);
+               batadv_hardif_put(hard_iface);
                goto out;
        }
 
@@ -681,7 +681,7 @@ batadv_neigh_node_new(struct batadv_orig_node *orig_node,
 
 out:
        if (hardif_neigh)
-               batadv_hardif_neigh_free_ref(hardif_neigh);
+               batadv_hardif_neigh_put(hardif_neigh);
        return neigh_node;
 }
 
@@ -707,7 +707,7 @@ int batadv_hardif_neigh_seq_print_text(struct seq_file *seq, void *offset)
                   primary_if->net_dev->dev_addr, net_dev->name,
                   bat_priv->bat_algo_ops->name);
 
-       batadv_hardif_free_ref(primary_if);
+       batadv_hardif_put(primary_if);
 
        if (!bat_priv->bat_algo_ops->bat_neigh_print) {
                seq_puts(seq,
@@ -732,22 +732,22 @@ static void batadv_orig_ifinfo_release(struct kref *ref)
        orig_ifinfo = container_of(ref, struct batadv_orig_ifinfo, refcount);
 
        if (orig_ifinfo->if_outgoing != BATADV_IF_DEFAULT)
-               batadv_hardif_free_ref(orig_ifinfo->if_outgoing);
+               batadv_hardif_put(orig_ifinfo->if_outgoing);
 
        /* this is the last reference to this object */
        router = rcu_dereference_protected(orig_ifinfo->router, true);
        if (router)
-               batadv_neigh_node_free_ref(router);
+               batadv_neigh_node_put(router);
 
        kfree_rcu(orig_ifinfo, rcu);
 }
 
 /**
- * batadv_orig_ifinfo_free_ref - decrement the refcounter and possibly release
+ * batadv_orig_ifinfo_put - decrement the refcounter and possibly release
  *  the orig_ifinfo
  * @orig_ifinfo: the orig_ifinfo object to release
  */
-void batadv_orig_ifinfo_free_ref(struct batadv_orig_ifinfo *orig_ifinfo)
+void batadv_orig_ifinfo_put(struct batadv_orig_ifinfo *orig_ifinfo)
 {
        kref_put(&orig_ifinfo->refcount, batadv_orig_ifinfo_release);
 }
@@ -793,13 +793,13 @@ static void batadv_orig_node_release(struct kref *ref)
        hlist_for_each_entry_safe(neigh_node, node_tmp,
                                  &orig_node->neigh_list, list) {
                hlist_del_rcu(&neigh_node->list);
-               batadv_neigh_node_free_ref(neigh_node);
+               batadv_neigh_node_put(neigh_node);
        }
 
        hlist_for_each_entry_safe(orig_ifinfo, node_tmp,
                                  &orig_node->ifinfo_list, list) {
                hlist_del_rcu(&orig_ifinfo->list);
-               batadv_orig_ifinfo_free_ref(orig_ifinfo);
+               batadv_orig_ifinfo_put(orig_ifinfo);
        }
        spin_unlock_bh(&orig_node->neigh_list_lock);
 
@@ -810,11 +810,11 @@ static void batadv_orig_node_release(struct kref *ref)
 }
 
 /**
- * batadv_orig_node_free_ref - decrement the orig node refcounter and possibly
+ * batadv_orig_node_put - decrement the orig node refcounter and possibly
  *  release it
  * @orig_node: the orig node to free
  */
-void batadv_orig_node_free_ref(struct batadv_orig_node *orig_node)
+void batadv_orig_node_put(struct batadv_orig_node *orig_node)
 {
        kref_put(&orig_node->refcount, batadv_orig_node_release);
 }
@@ -843,7 +843,7 @@ void batadv_originator_free(struct batadv_priv *bat_priv)
                hlist_for_each_entry_safe(orig_node, node_tmp,
                                          head, hash_entry) {
                        hlist_del_rcu(&orig_node->hash_entry);
-                       batadv_orig_node_free_ref(orig_node);
+                       batadv_orig_node_put(orig_node);
                }
                spin_unlock_bh(list_lock);
        }
@@ -917,7 +917,7 @@ struct batadv_orig_node *batadv_orig_node_new(struct batadv_priv *bat_priv,
         * Immediately release vlan since it is not needed anymore in this
         * context
         */
-       batadv_orig_node_vlan_free_ref(vlan);
+       batadv_orig_node_vlan_put(vlan);
 
        for (i = 0; i < BATADV_FRAG_BUFFER_COUNT; i++) {
                INIT_HLIST_HEAD(&orig_node->fragments[i].head);
@@ -966,7 +966,7 @@ batadv_purge_neigh_ifinfo(struct batadv_priv *bat_priv,
                           neigh->addr, if_outgoing->net_dev->name);
 
                hlist_del_rcu(&neigh_ifinfo->list);
-               batadv_neigh_ifinfo_free_ref(neigh_ifinfo);
+               batadv_neigh_ifinfo_put(neigh_ifinfo);
        }
 
        spin_unlock_bh(&neigh->ifinfo_lock);
@@ -1012,10 +1012,10 @@ batadv_purge_orig_ifinfo(struct batadv_priv *bat_priv,
                ifinfo_purged = true;
 
                hlist_del_rcu(&orig_ifinfo->list);
-               batadv_orig_ifinfo_free_ref(orig_ifinfo);
+               batadv_orig_ifinfo_put(orig_ifinfo);
                if (orig_node->last_bonding_candidate == orig_ifinfo) {
                        orig_node->last_bonding_candidate = NULL;
-                       batadv_orig_ifinfo_free_ref(orig_ifinfo);
+                       batadv_orig_ifinfo_put(orig_ifinfo);
                }
        }
 
@@ -1069,7 +1069,7 @@ batadv_purge_orig_neighbors(struct batadv_priv *bat_priv,
                        neigh_purged = true;
 
                        hlist_del_rcu(&neigh_node->list);
-                       batadv_neigh_node_free_ref(neigh_node);
+                       batadv_neigh_node_put(neigh_node);
                } else {
                        /* only necessary if not the whole neighbor is to be
                         * deleted, but some interface has been removed.
@@ -1108,7 +1108,7 @@ batadv_find_best_neighbor(struct batadv_priv *bat_priv,
                        continue;
 
                if (best)
-                       batadv_neigh_node_free_ref(best);
+                       batadv_neigh_node_put(best);
 
                best = neigh;
        }
@@ -1154,7 +1154,7 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv,
        batadv_update_route(bat_priv, orig_node, BATADV_IF_DEFAULT,
                            best_neigh_node);
        if (best_neigh_node)
-               batadv_neigh_node_free_ref(best_neigh_node);
+               batadv_neigh_node_put(best_neigh_node);
 
        /* ... then for all other interfaces. */
        rcu_read_lock();
@@ -1171,7 +1171,7 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv,
                batadv_update_route(bat_priv, orig_node, hard_iface,
                                    best_neigh_node);
                if (best_neigh_node)
-                       batadv_neigh_node_free_ref(best_neigh_node);
+                       batadv_neigh_node_put(best_neigh_node);
        }
        rcu_read_unlock();
 
@@ -1204,7 +1204,7 @@ static void _batadv_purge_orig(struct batadv_priv *bat_priv)
                                batadv_tt_global_del_orig(orig_node->bat_priv,
                                                          orig_node, -1,
                                                          "originator timed out");
-                               batadv_orig_node_free_ref(orig_node);
+                               batadv_orig_node_put(orig_node);
                                continue;
                        }
 
@@ -1250,7 +1250,7 @@ int batadv_orig_seq_print_text(struct seq_file *seq, void *offset)
                   primary_if->net_dev->dev_addr, net_dev->name,
                   bat_priv->bat_algo_ops->name);
 
-       batadv_hardif_free_ref(primary_if);
+       batadv_hardif_put(primary_if);
 
        if (!bat_priv->bat_algo_ops->bat_orig_print) {
                seq_puts(seq,
@@ -1306,7 +1306,7 @@ int batadv_orig_hardif_seq_print_text(struct seq_file *seq, void *offset)
 
 out:
        if (hard_iface)
-               batadv_hardif_free_ref(hard_iface);
+               batadv_hardif_put(hard_iface);
        return 0;
 }
 
This page took 0.047515 seconds and 5 git commands to generate.