Lines Matching refs:tpg_np

129 	struct iscsi_tpg_np *tpg_np;  in iscsit_get_tpg_from_np()  local
142 list_for_each_entry(tpg_np, &tpg->tpg_gnp_list, tpg_np_list) { in iscsit_get_tpg_from_np()
143 if (tpg_np->tpg_np == np) { in iscsit_get_tpg_from_np()
144 *tpg_np_out = tpg_np; in iscsit_get_tpg_from_np()
145 kref_get(&tpg_np->tpg_np_kref); in iscsit_get_tpg_from_np()
170 struct iscsi_tpg_np *tpg_np, in iscsit_clear_tpg_np_login_thread() argument
174 if (!tpg_np->tpg_np) { in iscsit_clear_tpg_np_login_thread()
180 tpg_np->tpg_np->enabled = false; in iscsit_clear_tpg_np_login_thread()
181 iscsit_reset_np_thread(tpg_np->tpg_np, tpg_np, tpg, shutdown); in iscsit_clear_tpg_np_login_thread()
188 struct iscsi_tpg_np *tpg_np; in iscsit_clear_tpg_np_login_threads() local
191 list_for_each_entry(tpg_np, &tpg->tpg_gnp_list, tpg_np_list) { in iscsit_clear_tpg_np_login_threads()
192 if (!tpg_np->tpg_np) { in iscsit_clear_tpg_np_login_threads()
197 iscsit_clear_tpg_np_login_thread(tpg_np, tpg, shutdown); in iscsit_clear_tpg_np_login_threads()
404 struct iscsi_tpg_np *tpg_np, in iscsit_tpg_locate_child_np() argument
409 spin_lock(&tpg_np->tpg_np_parent_lock); in iscsit_tpg_locate_child_np()
411 &tpg_np->tpg_np_parent_list, tpg_np_child_list) { in iscsit_tpg_locate_child_np()
412 if (tpg_np_child->tpg_np->np_network_transport == in iscsit_tpg_locate_child_np()
414 spin_unlock(&tpg_np->tpg_np_parent_lock); in iscsit_tpg_locate_child_np()
418 spin_unlock(&tpg_np->tpg_np_parent_lock); in iscsit_tpg_locate_child_np()
429 struct iscsi_tpg_np *tpg_np; in iscsit_tpg_check_network_portal() local
437 list_for_each_entry(tpg_np, &tpg->tpg_gnp_list, tpg_np_list) { in iscsit_tpg_check_network_portal()
438 np = tpg_np->tpg_np; in iscsit_tpg_check_network_portal()
459 struct iscsi_tpg_np *tpg_np; in iscsit_tpg_add_network_portal() local
471 tpg_np = kzalloc(sizeof(struct iscsi_tpg_np), GFP_KERNEL); in iscsit_tpg_add_network_portal()
472 if (!tpg_np) { in iscsit_tpg_add_network_portal()
480 kfree(tpg_np); in iscsit_tpg_add_network_portal()
484 INIT_LIST_HEAD(&tpg_np->tpg_np_list); in iscsit_tpg_add_network_portal()
485 INIT_LIST_HEAD(&tpg_np->tpg_np_child_list); in iscsit_tpg_add_network_portal()
486 INIT_LIST_HEAD(&tpg_np->tpg_np_parent_list); in iscsit_tpg_add_network_portal()
487 spin_lock_init(&tpg_np->tpg_np_parent_lock); in iscsit_tpg_add_network_portal()
488 init_completion(&tpg_np->tpg_np_comp); in iscsit_tpg_add_network_portal()
489 kref_init(&tpg_np->tpg_np_kref); in iscsit_tpg_add_network_portal()
490 tpg_np->tpg_np = np; in iscsit_tpg_add_network_portal()
491 tpg_np->tpg = tpg; in iscsit_tpg_add_network_portal()
494 list_add_tail(&tpg_np->tpg_np_list, &tpg->tpg_gnp_list); in iscsit_tpg_add_network_portal()
501 tpg_np->tpg_np_parent = tpg_np_parent; in iscsit_tpg_add_network_portal()
503 list_add_tail(&tpg_np->tpg_np_child_list, in iscsit_tpg_add_network_portal()
512 return tpg_np; in iscsit_tpg_add_network_portal()
516 struct iscsi_tpg_np *tpg_np, in iscsit_tpg_release_np() argument
520 iscsit_clear_tpg_np_login_thread(tpg_np, tpg, true); in iscsit_tpg_release_np()
526 tpg_np->tpg_np = NULL; in iscsit_tpg_release_np()
527 tpg_np->tpg = NULL; in iscsit_tpg_release_np()
528 kfree(tpg_np); in iscsit_tpg_release_np()
537 struct iscsi_tpg_np *tpg_np) in iscsit_tpg_del_network_portal() argument
543 np = tpg_np->tpg_np; in iscsit_tpg_del_network_portal()
550 if (!tpg_np->tpg_np_parent) { in iscsit_tpg_del_network_portal()
557 &tpg_np->tpg_np_parent_list, in iscsit_tpg_del_network_portal()
569 spin_lock(&tpg_np->tpg_np_parent->tpg_np_parent_lock); in iscsit_tpg_del_network_portal()
570 list_del(&tpg_np->tpg_np_child_list); in iscsit_tpg_del_network_portal()
571 spin_unlock(&tpg_np->tpg_np_parent->tpg_np_parent_lock); in iscsit_tpg_del_network_portal()
575 list_del(&tpg_np->tpg_np_list); in iscsit_tpg_del_network_portal()
581 return iscsit_tpg_release_np(tpg_np, tpg, np); in iscsit_tpg_del_network_portal()