mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
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: 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:
parent
321e3e0884
commit
a6416f9ffc
@ -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
|
||||
* @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);
|
||||
}
|
||||
@ -135,7 +135,7 @@ static void __batadv_dat_purge(struct batadv_priv *bat_priv,
|
||||
continue;
|
||||
|
||||
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);
|
||||
}
|
||||
@ -349,7 +349,7 @@ static void batadv_dat_entry_add(struct batadv_priv *bat_priv, __be32 ip,
|
||||
|
||||
if (unlikely(hash_added != 0)) {
|
||||
/* remove the reference for the hash */
|
||||
batadv_dat_entry_free_ref(dat_entry);
|
||||
batadv_dat_entry_put(dat_entry);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -358,7 +358,7 @@ static void batadv_dat_entry_add(struct batadv_priv *bat_priv, __be32 ip,
|
||||
|
||||
out:
|
||||
if (dat_entry)
|
||||
batadv_dat_entry_free_ref(dat_entry);
|
||||
batadv_dat_entry_put(dat_entry);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_DEBUG
|
||||
@ -1029,7 +1029,7 @@ bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
|
||||
}
|
||||
out:
|
||||
if (dat_entry)
|
||||
batadv_dat_entry_free_ref(dat_entry);
|
||||
batadv_dat_entry_put(dat_entry);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1109,7 +1109,7 @@ bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv,
|
||||
}
|
||||
out:
|
||||
if (dat_entry)
|
||||
batadv_dat_entry_free_ref(dat_entry);
|
||||
batadv_dat_entry_put(dat_entry);
|
||||
if (ret)
|
||||
kfree_skb(skb);
|
||||
return ret;
|
||||
@ -1262,6 +1262,6 @@ bool batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv,
|
||||
|
||||
out:
|
||||
if (dat_entry)
|
||||
batadv_dat_entry_free_ref(dat_entry);
|
||||
batadv_dat_entry_put(dat_entry);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user