Lines Matching refs:rx
66 struct rxrpc_call *rxrpc_find_call_by_user_ID(struct rxrpc_sock *rx, in rxrpc_find_call_by_user_ID() argument
72 _enter("%p,%lx", rx, user_call_ID); in rxrpc_find_call_by_user_ID()
74 read_lock(&rx->call_lock); in rxrpc_find_call_by_user_ID()
76 p = rx->calls.rb_node; in rxrpc_find_call_by_user_ID()
88 read_unlock(&rx->call_lock); in rxrpc_find_call_by_user_ID()
94 read_unlock(&rx->call_lock); in rxrpc_find_call_by_user_ID()
102 struct rxrpc_call *rxrpc_alloc_call(struct rxrpc_sock *rx, gfp_t gfp, in rxrpc_alloc_call() argument
106 struct rxrpc_net *rxnet = rxrpc_net(sock_net(&rx->sk)); in rxrpc_alloc_call()
127 if (rx->sk.sk_kern_sock) in rxrpc_alloc_call()
174 static struct rxrpc_call *rxrpc_alloc_client_call(struct rxrpc_sock *rx, in rxrpc_alloc_client_call() argument
184 call = rxrpc_alloc_call(rx, gfp, debug_id); in rxrpc_alloc_client_call()
249 struct rxrpc_call *rxrpc_new_client_call(struct rxrpc_sock *rx, in rxrpc_new_client_call() argument
255 __releases(&rx->sk.sk_lock.slock) in rxrpc_new_client_call()
265 _enter("%p,%lx", rx, p->user_call_ID); in rxrpc_new_client_call()
271 call = rxrpc_alloc_client_call(rx, srx, gfp, debug_id); in rxrpc_new_client_call()
273 release_sock(&rx->sk); in rxrpc_new_client_call()
293 write_lock(&rx->call_lock); in rxrpc_new_client_call()
295 pp = &rx->calls.rb_node; in rxrpc_new_client_call()
309 rcu_assign_pointer(call->socket, rx); in rxrpc_new_client_call()
314 rb_insert_color(&call->sock_node, &rx->calls); in rxrpc_new_client_call()
315 list_add(&call->sock_link, &rx->sock_calls); in rxrpc_new_client_call()
317 write_unlock(&rx->call_lock); in rxrpc_new_client_call()
325 release_sock(&rx->sk); in rxrpc_new_client_call()
330 ret = rxrpc_connect_call(rx, call, cp, srx, gfp); in rxrpc_new_client_call()
350 write_unlock(&rx->call_lock); in rxrpc_new_client_call()
351 release_sock(&rx->sk); in rxrpc_new_client_call()
356 rxrpc_release_call(rx, call); in rxrpc_new_client_call()
381 void rxrpc_incoming_call(struct rxrpc_sock *rx, in rxrpc_incoming_call() argument
391 rcu_assign_pointer(call->socket, rx); in rxrpc_incoming_call()
493 void rxrpc_release_call(struct rxrpc_sock *rx, struct rxrpc_call *call) in rxrpc_release_call() argument
517 write_lock_bh(&rx->recvmsg_lock); in rxrpc_release_call()
530 write_unlock_bh(&rx->recvmsg_lock); in rxrpc_release_call()
534 write_lock(&rx->call_lock); in rxrpc_release_call()
537 rb_erase(&call->sock_node, &rx->calls); in rxrpc_release_call()
543 write_unlock(&rx->call_lock); in rxrpc_release_call()
557 void rxrpc_release_calls_on_socket(struct rxrpc_sock *rx) in rxrpc_release_calls_on_socket() argument
561 _enter("%p", rx); in rxrpc_release_calls_on_socket()
563 while (!list_empty(&rx->to_be_accepted)) { in rxrpc_release_calls_on_socket()
564 call = list_entry(rx->to_be_accepted.next, in rxrpc_release_calls_on_socket()
571 while (!list_empty(&rx->sock_calls)) { in rxrpc_release_calls_on_socket()
572 call = list_entry(rx->sock_calls.next, in rxrpc_release_calls_on_socket()
577 rxrpc_release_call(rx, call); in rxrpc_release_calls_on_socket()