Lines Matching refs:neigh_ifinfo
248 struct batadv_neigh_ifinfo *neigh_ifinfo; in batadv_neigh_ifinfo_release() local
250 neigh_ifinfo = container_of(ref, struct batadv_neigh_ifinfo, refcount); in batadv_neigh_ifinfo_release()
252 if (neigh_ifinfo->if_outgoing != BATADV_IF_DEFAULT) in batadv_neigh_ifinfo_release()
253 batadv_hardif_put(neigh_ifinfo->if_outgoing); in batadv_neigh_ifinfo_release()
255 kfree_rcu(neigh_ifinfo, rcu); in batadv_neigh_ifinfo_release()
263 void batadv_neigh_ifinfo_put(struct batadv_neigh_ifinfo *neigh_ifinfo) in batadv_neigh_ifinfo_put() argument
265 kref_put(&neigh_ifinfo->refcount, batadv_neigh_ifinfo_release); in batadv_neigh_ifinfo_put()
307 struct batadv_neigh_ifinfo *neigh_ifinfo; in batadv_neigh_node_release() local
311 hlist_for_each_entry_safe(neigh_ifinfo, node_tmp, in batadv_neigh_node_release()
313 batadv_neigh_ifinfo_put(neigh_ifinfo); in batadv_neigh_node_release()
457 struct batadv_neigh_ifinfo *neigh_ifinfo = NULL, in batadv_neigh_ifinfo_get() local
469 neigh_ifinfo = tmp_neigh_ifinfo; in batadv_neigh_ifinfo_get()
474 return neigh_ifinfo; in batadv_neigh_ifinfo_get()
492 struct batadv_neigh_ifinfo *neigh_ifinfo; in batadv_neigh_ifinfo_new() local
496 neigh_ifinfo = batadv_neigh_ifinfo_get(neigh, if_outgoing); in batadv_neigh_ifinfo_new()
497 if (neigh_ifinfo) in batadv_neigh_ifinfo_new()
500 neigh_ifinfo = kzalloc(sizeof(*neigh_ifinfo), GFP_ATOMIC); in batadv_neigh_ifinfo_new()
501 if (!neigh_ifinfo) in batadv_neigh_ifinfo_new()
507 INIT_HLIST_NODE(&neigh_ifinfo->list); in batadv_neigh_ifinfo_new()
508 kref_init(&neigh_ifinfo->refcount); in batadv_neigh_ifinfo_new()
509 neigh_ifinfo->if_outgoing = if_outgoing; in batadv_neigh_ifinfo_new()
511 kref_get(&neigh_ifinfo->refcount); in batadv_neigh_ifinfo_new()
512 hlist_add_head_rcu(&neigh_ifinfo->list, &neigh->ifinfo_list); in batadv_neigh_ifinfo_new()
517 return neigh_ifinfo; in batadv_neigh_ifinfo_new()
1099 struct batadv_neigh_ifinfo *neigh_ifinfo; in batadv_purge_neigh_ifinfo() local
1106 hlist_for_each_entry_safe(neigh_ifinfo, node_tmp, in batadv_purge_neigh_ifinfo()
1108 if_outgoing = neigh_ifinfo->if_outgoing; in batadv_purge_neigh_ifinfo()
1124 hlist_del_rcu(&neigh_ifinfo->list); in batadv_purge_neigh_ifinfo()
1125 batadv_neigh_ifinfo_put(neigh_ifinfo); in batadv_purge_neigh_ifinfo()