Skip to content

Commit 5fff282

Browse files
ecsvordex
authored andcommitted
batman-adv: Rename batadv_nc_path *_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>
1 parent 27ad754 commit 5fff282

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎net/batman-adv/network-coding.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@ static void batadv_nc_path_release(struct kref *ref)
247247
}
248248

249249
/**
250-
* batadv_nc_path_free_ref - decrement the nc_path refcounter and possibly
250+
* batadv_nc_path_put - decrement the nc_path refcounter and possibly
251251
* release it
252252
* @nc_path: nc_path to be free'd
253253
*/
254-
static void batadv_nc_path_free_ref(struct batadv_nc_path *nc_path)
254+
static void batadv_nc_path_put(struct batadv_nc_path *nc_path)
255255
{
256256
kref_put(&nc_path->refcount, batadv_nc_path_release);
257257
}
@@ -263,7 +263,7 @@ static void batadv_nc_path_free_ref(struct batadv_nc_path *nc_path)
263263
static void batadv_nc_packet_free(struct batadv_nc_packet *nc_packet)
264264
{
265265
kfree_skb(nc_packet->skb);
266-
batadv_nc_path_free_ref(nc_packet->nc_path);
266+
batadv_nc_path_put(nc_packet->nc_path);
267267
kfree(nc_packet);
268268
}
269269

@@ -467,7 +467,7 @@ static void batadv_nc_purge_paths(struct batadv_priv *bat_priv,
467467
"Remove nc_path %pM -> %pM\n",
468468
nc_path->prev_hop, nc_path->next_hop);
469469
hlist_del_rcu(&nc_path->hash_entry);
470-
batadv_nc_path_free_ref(nc_path);
470+
batadv_nc_path_put(nc_path);
471471
}
472472
spin_unlock_bh(lock);
473473
}
@@ -1555,7 +1555,7 @@ bool batadv_nc_skb_forward(struct sk_buff *skb,
15551555
return true;
15561556

15571557
free_nc_path:
1558-
batadv_nc_path_free_ref(nc_path);
1558+
batadv_nc_path_put(nc_path);
15591559
out:
15601560
/* Packet is not consumed */
15611561
return false;
@@ -1617,7 +1617,7 @@ void batadv_nc_skb_store_for_decoding(struct batadv_priv *bat_priv,
16171617
free_skb:
16181618
kfree_skb(skb);
16191619
free_nc_path:
1620-
batadv_nc_path_free_ref(nc_path);
1620+
batadv_nc_path_put(nc_path);
16211621
out:
16221622
return;
16231623
}

0 commit comments

Comments
 (0)