Lines Matching refs:othercon
124 struct connection *othercon; member
610 if (con->othercon && and_other) { in close_connection()
612 close_connection(con->othercon, false, true, true); in close_connection()
791 struct connection *othercon = newcon->othercon; in tcp_accept_from_sock() local
793 if (!othercon) { in tcp_accept_from_sock()
794 othercon = kmem_cache_zalloc(con_cache, GFP_NOFS); in tcp_accept_from_sock()
795 if (!othercon) { in tcp_accept_from_sock()
801 othercon->nodeid = nodeid; in tcp_accept_from_sock()
802 othercon->rx_action = receive_from_sock; in tcp_accept_from_sock()
803 mutex_init(&othercon->sock_mutex); in tcp_accept_from_sock()
804 INIT_LIST_HEAD(&othercon->writequeue); in tcp_accept_from_sock()
805 spin_lock_init(&othercon->writequeue_lock); in tcp_accept_from_sock()
806 INIT_WORK(&othercon->swork, process_send_sockets); in tcp_accept_from_sock()
807 INIT_WORK(&othercon->rwork, process_recv_sockets); in tcp_accept_from_sock()
808 set_bit(CF_IS_OTHERCON, &othercon->flags); in tcp_accept_from_sock()
810 mutex_lock_nested(&othercon->sock_mutex, 2); in tcp_accept_from_sock()
811 if (!othercon->sock) { in tcp_accept_from_sock()
812 newcon->othercon = othercon; in tcp_accept_from_sock()
813 add_sock(newsock, othercon); in tcp_accept_from_sock()
814 addcon = othercon; in tcp_accept_from_sock()
815 mutex_unlock(&othercon->sock_mutex); in tcp_accept_from_sock()
820 mutex_unlock(&othercon->sock_mutex); in tcp_accept_from_sock()
911 struct connection *othercon = newcon->othercon; in sctp_accept_from_sock() local
913 if (!othercon) { in sctp_accept_from_sock()
914 othercon = kmem_cache_zalloc(con_cache, GFP_NOFS); in sctp_accept_from_sock()
915 if (!othercon) { in sctp_accept_from_sock()
921 othercon->nodeid = nodeid; in sctp_accept_from_sock()
922 othercon->rx_action = receive_from_sock; in sctp_accept_from_sock()
923 mutex_init(&othercon->sock_mutex); in sctp_accept_from_sock()
924 INIT_LIST_HEAD(&othercon->writequeue); in sctp_accept_from_sock()
925 spin_lock_init(&othercon->writequeue_lock); in sctp_accept_from_sock()
926 INIT_WORK(&othercon->swork, process_send_sockets); in sctp_accept_from_sock()
927 INIT_WORK(&othercon->rwork, process_recv_sockets); in sctp_accept_from_sock()
928 set_bit(CF_IS_OTHERCON, &othercon->flags); in sctp_accept_from_sock()
930 mutex_lock_nested(&othercon->sock_mutex, 2); in sctp_accept_from_sock()
931 if (!othercon->sock) { in sctp_accept_from_sock()
932 newcon->othercon = othercon; in sctp_accept_from_sock()
933 add_sock(newsock, othercon); in sctp_accept_from_sock()
934 addcon = othercon; in sctp_accept_from_sock()
935 mutex_unlock(&othercon->sock_mutex); in sctp_accept_from_sock()
939 mutex_unlock(&othercon->sock_mutex); in sctp_accept_from_sock()
1668 if (con->othercon && and_other) in _stop_conn()
1669 _stop_conn(con->othercon, false); in _stop_conn()
1681 if (con->othercon) in free_conn()
1682 kmem_cache_free(con_cache, con->othercon); in free_conn()
1706 if (con->othercon) { in work_flush()
1708 &con->othercon->flags); in work_flush()
1710 &con->othercon->flags); in work_flush()