batman-adv: Rename batadv_hardif *_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>
This commit is contained in:

committed by
Antonio Quartulli

parent
5d9673109c
commit
82047ad7fe
@@ -196,7 +196,7 @@ 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);
|
||||
}
|
||||
@@ -227,7 +227,7 @@ 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);
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ static void batadv_neigh_node_release(struct kref *ref)
|
||||
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);
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,7 +732,7 @@ 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);
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user