Lines Matching refs:neigh_ifinfo
226 struct batadv_neigh_ifinfo *neigh_ifinfo; in batadv_neigh_ifinfo_release() local
228 neigh_ifinfo = container_of(ref, struct batadv_neigh_ifinfo, refcount); in batadv_neigh_ifinfo_release()
230 if (neigh_ifinfo->if_outgoing != BATADV_IF_DEFAULT) in batadv_neigh_ifinfo_release()
231 batadv_hardif_put(neigh_ifinfo->if_outgoing); in batadv_neigh_ifinfo_release()
233 kfree_rcu(neigh_ifinfo, rcu); in batadv_neigh_ifinfo_release()
265 struct batadv_neigh_ifinfo *neigh_ifinfo; in batadv_neigh_node_release() local
269 hlist_for_each_entry_safe(neigh_ifinfo, node_tmp, in batadv_neigh_node_release()
271 batadv_neigh_ifinfo_put(neigh_ifinfo); in batadv_neigh_node_release()
405 struct batadv_neigh_ifinfo *neigh_ifinfo = NULL, in batadv_neigh_ifinfo_get() local
417 neigh_ifinfo = tmp_neigh_ifinfo; in batadv_neigh_ifinfo_get()
422 return neigh_ifinfo; in batadv_neigh_ifinfo_get()
440 struct batadv_neigh_ifinfo *neigh_ifinfo; in batadv_neigh_ifinfo_new() local
444 neigh_ifinfo = batadv_neigh_ifinfo_get(neigh, if_outgoing); in batadv_neigh_ifinfo_new()
445 if (neigh_ifinfo) in batadv_neigh_ifinfo_new()
448 neigh_ifinfo = kzalloc(sizeof(*neigh_ifinfo), GFP_ATOMIC); in batadv_neigh_ifinfo_new()
449 if (!neigh_ifinfo) in batadv_neigh_ifinfo_new()
455 INIT_HLIST_NODE(&neigh_ifinfo->list); in batadv_neigh_ifinfo_new()
456 kref_init(&neigh_ifinfo->refcount); in batadv_neigh_ifinfo_new()
457 neigh_ifinfo->if_outgoing = if_outgoing; in batadv_neigh_ifinfo_new()
459 kref_get(&neigh_ifinfo->refcount); in batadv_neigh_ifinfo_new()
460 hlist_add_head_rcu(&neigh_ifinfo->list, &neigh->ifinfo_list); in batadv_neigh_ifinfo_new()
465 return neigh_ifinfo; in batadv_neigh_ifinfo_new()
982 struct batadv_neigh_ifinfo *neigh_ifinfo; in batadv_purge_neigh_ifinfo() local
989 hlist_for_each_entry_safe(neigh_ifinfo, node_tmp, in batadv_purge_neigh_ifinfo()
991 if_outgoing = neigh_ifinfo->if_outgoing; in batadv_purge_neigh_ifinfo()
1007 hlist_del_rcu(&neigh_ifinfo->list); in batadv_purge_neigh_ifinfo()
1008 batadv_neigh_ifinfo_put(neigh_ifinfo); in batadv_purge_neigh_ifinfo()