Commit ba610043afbcd12a1c34ed57fc0689a29aa35b58
Committed by
Antonio Quartulli
1 parent
3a01743ddf
batman-adv: Rename batadv_tvlv_handler *_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>
Showing 1 changed file with 6 additions and 7 deletions Side-by-side Diff
net/batman-adv/main.c
... | ... | @@ -638,12 +638,11 @@ |
638 | 638 | } |
639 | 639 | |
640 | 640 | /** |
641 | - * batadv_tvlv_handler_free_ref - decrement the tvlv container refcounter and | |
641 | + * batadv_tvlv_handler_put - decrement the tvlv container refcounter and | |
642 | 642 | * possibly release it |
643 | 643 | * @tvlv_handler: the tvlv handler to free |
644 | 644 | */ |
645 | -static void | |
646 | -batadv_tvlv_handler_free_ref(struct batadv_tvlv_handler *tvlv_handler) | |
645 | +static void batadv_tvlv_handler_put(struct batadv_tvlv_handler *tvlv_handler) | |
647 | 646 | { |
648 | 647 | kref_put(&tvlv_handler->refcount, batadv_tvlv_handler_release); |
649 | 648 | } |
... | ... | @@ -1031,7 +1030,7 @@ |
1031 | 1030 | src, dst, tvlv_value, |
1032 | 1031 | tvlv_value_cont_len); |
1033 | 1032 | if (tvlv_handler) |
1034 | - batadv_tvlv_handler_free_ref(tvlv_handler); | |
1033 | + batadv_tvlv_handler_put(tvlv_handler); | |
1035 | 1034 | tvlv_value = (u8 *)tvlv_value + tvlv_value_cont_len; |
1036 | 1035 | tvlv_value_len -= tvlv_value_cont_len; |
1037 | 1036 | } |
... | ... | @@ -1111,7 +1110,7 @@ |
1111 | 1110 | |
1112 | 1111 | tvlv_handler = batadv_tvlv_handler_get(bat_priv, type, version); |
1113 | 1112 | if (tvlv_handler) { |
1114 | - batadv_tvlv_handler_free_ref(tvlv_handler); | |
1113 | + batadv_tvlv_handler_put(tvlv_handler); | |
1115 | 1114 | return; |
1116 | 1115 | } |
1117 | 1116 | |
1118 | 1117 | |
... | ... | @@ -1148,11 +1147,11 @@ |
1148 | 1147 | if (!tvlv_handler) |
1149 | 1148 | return; |
1150 | 1149 | |
1151 | - batadv_tvlv_handler_free_ref(tvlv_handler); | |
1150 | + batadv_tvlv_handler_put(tvlv_handler); | |
1152 | 1151 | spin_lock_bh(&bat_priv->tvlv.handler_list_lock); |
1153 | 1152 | hlist_del_rcu(&tvlv_handler->list); |
1154 | 1153 | spin_unlock_bh(&bat_priv->tvlv.handler_list_lock); |
1155 | - batadv_tvlv_handler_free_ref(tvlv_handler); | |
1154 | + batadv_tvlv_handler_put(tvlv_handler); | |
1156 | 1155 | } |
1157 | 1156 | |
1158 | 1157 | /** |