Lines Matching refs:trans
65 struct rxrpc_transport *trans, in rxrpc_get_bundle() argument
74 rx, key_serial(key), trans->debug_id, ntohs(service_id)); in rxrpc_get_bundle()
76 if (rx->trans == trans && rx->bundle) { in rxrpc_get_bundle()
83 spin_lock(&trans->client_lock); in rxrpc_get_bundle()
85 p = trans->bundles.rb_node; in rxrpc_get_bundle()
97 spin_unlock(&trans->client_lock); in rxrpc_get_bundle()
110 spin_lock(&trans->client_lock); in rxrpc_get_bundle()
112 pp = &trans->bundles.rb_node; in rxrpc_get_bundle()
131 rb_insert_color(&bundle->node, &trans->bundles); in rxrpc_get_bundle()
132 spin_unlock(&trans->client_lock); in rxrpc_get_bundle()
133 _net("BUNDLE new on trans %d", trans->debug_id); in rxrpc_get_bundle()
144 spin_unlock(&trans->client_lock); in rxrpc_get_bundle()
145 _net("BUNDLE old on trans %d", trans->debug_id); in rxrpc_get_bundle()
156 spin_unlock(&trans->client_lock); in rxrpc_get_bundle()
158 _net("BUNDLE old2 on trans %d", trans->debug_id); in rxrpc_get_bundle()
170 void rxrpc_put_bundle(struct rxrpc_transport *trans, in rxrpc_put_bundle() argument
173 _enter("%p,%p{%d}",trans, bundle, atomic_read(&bundle->usage)); in rxrpc_put_bundle()
175 if (atomic_dec_and_lock(&bundle->usage, &trans->client_lock)) { in rxrpc_put_bundle()
177 rb_erase(&bundle->node, &trans->bundles); in rxrpc_put_bundle()
178 spin_unlock(&trans->client_lock); in rxrpc_put_bundle()
234 write_lock_bh(&conn->trans->conn_lock); in rxrpc_assign_connection_id()
236 conn->trans->conn_idcounter += RXRPC_CID_INC; in rxrpc_assign_connection_id()
237 if (conn->trans->conn_idcounter < RXRPC_CID_INC) in rxrpc_assign_connection_id()
238 conn->trans->conn_idcounter = RXRPC_CID_INC; in rxrpc_assign_connection_id()
239 real_conn_id = conn->trans->conn_idcounter; in rxrpc_assign_connection_id()
243 p = &conn->trans->client_conns.rb_node; in rxrpc_assign_connection_id()
264 rb_insert_color(&conn->node, &conn->trans->client_conns); in rxrpc_assign_connection_id()
268 write_unlock_bh(&conn->trans->conn_lock); in rxrpc_assign_connection_id()
279 conn->trans->conn_idcounter = real_conn_id; in rxrpc_assign_connection_id()
331 struct rxrpc_transport *trans, in rxrpc_connect_exclusive() argument
351 conn->trans = trans; in rxrpc_connect_exclusive()
375 spin_lock(&trans->client_lock); in rxrpc_connect_exclusive()
376 atomic_inc(&trans->usage); in rxrpc_connect_exclusive()
379 conn->debug_id, conn->trans->debug_id); in rxrpc_connect_exclusive()
406 spin_unlock(&trans->client_lock); in rxrpc_connect_exclusive()
413 spin_unlock(&trans->client_lock); in rxrpc_connect_exclusive()
423 struct rxrpc_transport *trans, in rxrpc_connect_call() argument
436 return rxrpc_connect_exclusive(rx, trans, bundle->service_id, in rxrpc_connect_call()
439 spin_lock(&trans->client_lock); in rxrpc_connect_call()
478 spin_unlock(&trans->client_lock); in rxrpc_connect_call()
504 spin_lock(&trans->client_lock); in rxrpc_connect_call()
516 candidate->trans = trans; in rxrpc_connect_call()
540 spin_lock(&trans->client_lock); in rxrpc_connect_call()
545 atomic_inc(&trans->usage); in rxrpc_connect_call()
548 candidate->debug_id, candidate->trans->debug_id); in rxrpc_connect_call()
586 spin_unlock(&trans->client_lock); in rxrpc_connect_call()
605 rxrpc_incoming_connection(struct rxrpc_transport *trans, in rxrpc_incoming_connection() argument
623 read_lock_bh(&trans->conn_lock); in rxrpc_incoming_connection()
625 p = trans->server_conns.rb_node; in rxrpc_incoming_connection()
642 read_unlock_bh(&trans->conn_lock); in rxrpc_incoming_connection()
652 candidate->trans = trans; in rxrpc_incoming_connection()
664 write_lock_bh(&trans->conn_lock); in rxrpc_incoming_connection()
666 pp = &trans->server_conns.rb_node; in rxrpc_incoming_connection()
688 rb_insert_color(&conn->node, &trans->server_conns); in rxrpc_incoming_connection()
689 atomic_inc(&conn->trans->usage); in rxrpc_incoming_connection()
691 write_unlock_bh(&trans->conn_lock); in rxrpc_incoming_connection()
708 read_unlock_bh(&trans->conn_lock); in rxrpc_incoming_connection()
712 read_unlock_bh(&trans->conn_lock); in rxrpc_incoming_connection()
718 write_unlock_bh(&trans->conn_lock); in rxrpc_incoming_connection()
722 write_unlock_bh(&trans->conn_lock); in rxrpc_incoming_connection()
736 struct rxrpc_connection *rxrpc_find_connection(struct rxrpc_transport *trans, in rxrpc_find_connection() argument
746 read_lock_bh(&trans->conn_lock); in rxrpc_find_connection()
752 p = trans->server_conns.rb_node; in rxrpc_find_connection()
754 p = trans->client_conns.rb_node; in rxrpc_find_connection()
773 read_unlock_bh(&trans->conn_lock); in rxrpc_find_connection()
779 read_unlock_bh(&trans->conn_lock); in rxrpc_find_connection()
815 rxrpc_put_bundle(conn->trans, conn->bundle); in rxrpc_destroy_connection()
821 rxrpc_put_transport(conn->trans); in rxrpc_destroy_connection()
850 spin_lock(&conn->trans->client_lock); in rxrpc_connection_reaper()
851 write_lock(&conn->trans->conn_lock); in rxrpc_connection_reaper()
860 &conn->trans->client_conns); in rxrpc_connection_reaper()
863 &conn->trans->server_conns); in rxrpc_connection_reaper()
873 write_unlock(&conn->trans->conn_lock); in rxrpc_connection_reaper()
874 spin_unlock(&conn->trans->client_lock); in rxrpc_connection_reaper()