• Home
  • Raw
  • Download

Lines Matching refs:node

155 static void tipc_node_delete(struct tipc_node *node);
159 static void tipc_node_put(struct tipc_node *node);
217 static void tipc_node_put(struct tipc_node *node) in tipc_node_put() argument
219 kref_put(&node->kref, tipc_node_kref_release); in tipc_node_put()
222 static void tipc_node_get(struct tipc_node *node) in tipc_node_get() argument
224 kref_get(&node->kref); in tipc_node_get()
233 struct tipc_node *node; in tipc_node_find() local
240 hlist_for_each_entry_rcu(node, &tn->node_htable[thash], hash) { in tipc_node_find()
241 if (node->addr != addr) in tipc_node_find()
243 if (!kref_get_unless_zero(&node->kref)) in tipc_node_find()
244 node = NULL; in tipc_node_find()
248 return node; in tipc_node_find()
390 static void tipc_node_delete(struct tipc_node *node) in tipc_node_delete() argument
392 list_del_rcu(&node->list); in tipc_node_delete()
393 hlist_del_rcu(&node->hash); in tipc_node_delete()
394 tipc_node_put(node); in tipc_node_delete()
396 del_timer_sync(&node->timer); in tipc_node_delete()
397 tipc_node_put(node); in tipc_node_delete()
403 struct tipc_node *node, *t_node; in tipc_node_stop() local
406 list_for_each_entry_safe(node, t_node, &tn->node_list, list) in tipc_node_stop()
407 tipc_node_delete(node); in tipc_node_stop()
449 struct tipc_node *node; in tipc_node_add_conn() local
456 node = tipc_node_find(net, dnode); in tipc_node_add_conn()
457 if (!node) { in tipc_node_add_conn()
470 tipc_node_write_lock(node); in tipc_node_add_conn()
471 list_add_tail(&conn->list, &node->conn_sks); in tipc_node_add_conn()
472 tipc_node_write_unlock(node); in tipc_node_add_conn()
474 tipc_node_put(node); in tipc_node_add_conn()
480 struct tipc_node *node; in tipc_node_remove_conn() local
486 node = tipc_node_find(net, dnode); in tipc_node_remove_conn()
487 if (!node) in tipc_node_remove_conn()
490 tipc_node_write_lock(node); in tipc_node_remove_conn()
491 list_for_each_entry_safe(conn, safe, &node->conn_sks, list) { in tipc_node_remove_conn()
497 tipc_node_write_unlock(node); in tipc_node_remove_conn()
498 tipc_node_put(node); in tipc_node_remove_conn()
1115 struct tipc_node *node = tipc_node_find(net, addr); in tipc_node_get_linkname() local
1117 if (!node) in tipc_node_get_linkname()
1123 tipc_node_read_lock(node); in tipc_node_get_linkname()
1124 link = node->links[bearer_id].link; in tipc_node_get_linkname()
1130 tipc_node_read_unlock(node); in tipc_node_get_linkname()
1131 tipc_node_put(node); in tipc_node_get_linkname()
1136 static int __tipc_nl_add_node(struct tipc_nl_msg *msg, struct tipc_node *node) in __tipc_nl_add_node() argument
1150 if (nla_put_u32(msg->skb, TIPC_NLA_NODE_ADDR, node->addr)) in __tipc_nl_add_node()
1152 if (tipc_node_is_up(node)) in __tipc_nl_add_node()
1659 struct tipc_node *node; in tipc_nl_node_dump() local
1671 node = tipc_node_find(net, last_addr); in tipc_nl_node_dump()
1672 if (!node) { in tipc_nl_node_dump()
1684 tipc_node_put(node); in tipc_nl_node_dump()
1687 list_for_each_entry_rcu(node, &tn->node_list, list) { in tipc_nl_node_dump()
1689 if (node->addr == last_addr) in tipc_nl_node_dump()
1695 tipc_node_read_lock(node); in tipc_nl_node_dump()
1696 err = __tipc_nl_add_node(&msg, node); in tipc_nl_node_dump()
1698 last_addr = node->addr; in tipc_nl_node_dump()
1699 tipc_node_read_unlock(node); in tipc_nl_node_dump()
1703 tipc_node_read_unlock(node); in tipc_nl_node_dump()
1759 struct tipc_node *node; in tipc_nl_node_set_link() local
1783 node = tipc_node_find_by_name(net, name, &bearer_id); in tipc_nl_node_set_link()
1784 if (!node) in tipc_nl_node_set_link()
1787 tipc_node_read_lock(node); in tipc_nl_node_set_link()
1789 link = node->links[bearer_id].link; in tipc_nl_node_set_link()
1826 tipc_node_read_unlock(node); in tipc_nl_node_set_link()
1827 tipc_bearer_xmit(net, bearer_id, &xmitq, &node->links[bearer_id].maddr); in tipc_nl_node_set_link()
1855 struct tipc_node *node; in tipc_nl_node_get_link() local
1858 node = tipc_node_find_by_name(net, name, &bearer_id); in tipc_nl_node_get_link()
1859 if (!node) { in tipc_nl_node_get_link()
1864 tipc_node_read_lock(node); in tipc_nl_node_get_link()
1865 link = node->links[bearer_id].link; in tipc_nl_node_get_link()
1867 tipc_node_read_unlock(node); in tipc_nl_node_get_link()
1873 tipc_node_read_unlock(node); in tipc_nl_node_get_link()
1891 struct tipc_node *node; in tipc_nl_node_reset_link_stats() local
1917 node = tipc_node_find_by_name(net, link_name, &bearer_id); in tipc_nl_node_reset_link_stats()
1918 if (!node) in tipc_nl_node_reset_link_stats()
1921 le = &node->links[bearer_id]; in tipc_nl_node_reset_link_stats()
1922 tipc_node_read_lock(node); in tipc_nl_node_reset_link_stats()
1924 link = node->links[bearer_id].link; in tipc_nl_node_reset_link_stats()
1927 tipc_node_read_unlock(node); in tipc_nl_node_reset_link_stats()
1932 tipc_node_read_unlock(node); in tipc_nl_node_reset_link_stats()
1938 struct tipc_node *node, u32 *prev_link) in __tipc_nl_add_node_links() argument
1946 if (!node->links[i].link) in __tipc_nl_add_node_links()
1950 node->links[i].link, NLM_F_MULTI); in __tipc_nl_add_node_links()
1963 struct tipc_node *node; in tipc_nl_node_dump_link() local
1979 node = tipc_node_find(net, prev_node); in tipc_nl_node_dump_link()
1980 if (!node) { in tipc_nl_node_dump_link()
1990 tipc_node_put(node); in tipc_nl_node_dump_link()
1992 list_for_each_entry_continue_rcu(node, &tn->node_list, in tipc_nl_node_dump_link()
1994 tipc_node_read_lock(node); in tipc_nl_node_dump_link()
1995 err = __tipc_nl_add_node_links(net, &msg, node, in tipc_nl_node_dump_link()
1997 tipc_node_read_unlock(node); in tipc_nl_node_dump_link()
2001 prev_node = node->addr; in tipc_nl_node_dump_link()
2008 list_for_each_entry_rcu(node, &tn->node_list, list) { in tipc_nl_node_dump_link()
2009 tipc_node_read_lock(node); in tipc_nl_node_dump_link()
2010 err = __tipc_nl_add_node_links(net, &msg, node, in tipc_nl_node_dump_link()
2012 tipc_node_read_unlock(node); in tipc_nl_node_dump_link()
2016 prev_node = node->addr; in tipc_nl_node_dump_link()