Commit a6416f9f authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Antonio Quartulli

batman-adv: Rename batadv_dat_entry *_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: default avatarSven Eckelmann <sven@narfation.org>
Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: default avatarAntonio Quartulli <a@unstable.cc>
parent 321e3e08
...@@ -77,11 +77,11 @@ static void batadv_dat_entry_release(struct kref *ref) ...@@ -77,11 +77,11 @@ static void batadv_dat_entry_release(struct kref *ref)
} }
/** /**
* batadv_dat_entry_free_ref - decrement the dat_entry refcounter and possibly * batadv_dat_entry_put - decrement the dat_entry refcounter and possibly
* release it * release it
* @dat_entry: dat_entry to be free'd * @dat_entry: dat_entry to be free'd
*/ */
static void batadv_dat_entry_free_ref(struct batadv_dat_entry *dat_entry) static void batadv_dat_entry_put(struct batadv_dat_entry *dat_entry)
{ {
kref_put(&dat_entry->refcount, batadv_dat_entry_release); kref_put(&dat_entry->refcount, batadv_dat_entry_release);
} }
...@@ -135,7 +135,7 @@ static void __batadv_dat_purge(struct batadv_priv *bat_priv, ...@@ -135,7 +135,7 @@ static void __batadv_dat_purge(struct batadv_priv *bat_priv,
continue; continue;
hlist_del_rcu(&dat_entry->hash_entry); hlist_del_rcu(&dat_entry->hash_entry);
batadv_dat_entry_free_ref(dat_entry); batadv_dat_entry_put(dat_entry);
} }
spin_unlock_bh(list_lock); spin_unlock_bh(list_lock);
} }
...@@ -349,7 +349,7 @@ static void batadv_dat_entry_add(struct batadv_priv *bat_priv, __be32 ip, ...@@ -349,7 +349,7 @@ static void batadv_dat_entry_add(struct batadv_priv *bat_priv, __be32 ip,
if (unlikely(hash_added != 0)) { if (unlikely(hash_added != 0)) {
/* remove the reference for the hash */ /* remove the reference for the hash */
batadv_dat_entry_free_ref(dat_entry); batadv_dat_entry_put(dat_entry);
goto out; goto out;
} }
...@@ -358,7 +358,7 @@ static void batadv_dat_entry_add(struct batadv_priv *bat_priv, __be32 ip, ...@@ -358,7 +358,7 @@ static void batadv_dat_entry_add(struct batadv_priv *bat_priv, __be32 ip,
out: out:
if (dat_entry) if (dat_entry)
batadv_dat_entry_free_ref(dat_entry); batadv_dat_entry_put(dat_entry);
} }
#ifdef CONFIG_BATMAN_ADV_DEBUG #ifdef CONFIG_BATMAN_ADV_DEBUG
...@@ -1029,7 +1029,7 @@ bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv, ...@@ -1029,7 +1029,7 @@ bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
} }
out: out:
if (dat_entry) if (dat_entry)
batadv_dat_entry_free_ref(dat_entry); batadv_dat_entry_put(dat_entry);
return ret; return ret;
} }
...@@ -1109,7 +1109,7 @@ bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv, ...@@ -1109,7 +1109,7 @@ bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv,
} }
out: out:
if (dat_entry) if (dat_entry)
batadv_dat_entry_free_ref(dat_entry); batadv_dat_entry_put(dat_entry);
if (ret) if (ret)
kfree_skb(skb); kfree_skb(skb);
return ret; return ret;
...@@ -1262,6 +1262,6 @@ bool batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv, ...@@ -1262,6 +1262,6 @@ bool batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv,
out: out:
if (dat_entry) if (dat_entry)
batadv_dat_entry_free_ref(dat_entry); batadv_dat_entry_put(dat_entry);
return ret; return ret;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment