conn_client.c (4092de1ba34eb376791809fb366bc15f8a9e0b7c) | conn_client.c (4c1295dccc0afe0905b6ca4c62ade7f2406f2cfb) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* Client connection-specific management code. 3 * 4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 5 * Written by David Howells (dhowells@redhat.com) 6 * 7 * Client connections need to be cached for a little while after they've made a 8 * call so as to handle retransmitted DATA packets in case the server didn't --- 198 unchanged lines hidden (view full) --- 207 list_add_tail(&conn->proc_link, &rxnet->conn_proc_list); 208 write_unlock(&rxnet->conn_lock); 209 210 /* We steal the caller's peer ref. */ 211 cp->peer = NULL; 212 rxrpc_get_local(conn->params.local); 213 key_get(conn->params.key); 214 | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* Client connection-specific management code. 3 * 4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 5 * Written by David Howells (dhowells@redhat.com) 6 * 7 * Client connections need to be cached for a little while after they've made a 8 * call so as to handle retransmitted DATA packets in case the server didn't --- 198 unchanged lines hidden (view full) --- 207 list_add_tail(&conn->proc_link, &rxnet->conn_proc_list); 208 write_unlock(&rxnet->conn_lock); 209 210 /* We steal the caller's peer ref. */ 211 cp->peer = NULL; 212 rxrpc_get_local(conn->params.local); 213 key_get(conn->params.key); 214 |
215 trace_rxrpc_conn(conn, rxrpc_conn_new_client, atomic_read(&conn->usage), | 215 trace_rxrpc_conn(conn->debug_id, rxrpc_conn_new_client, 216 atomic_read(&conn->usage), |
216 __builtin_return_address(0)); 217 trace_rxrpc_client(conn, -1, rxrpc_client_alloc); 218 _leave(" = %p", conn); 219 return conn; 220 221error_2: 222 conn->security->clear(conn); 223error_1: --- 756 unchanged lines hidden (view full) --- 980} 981 982/* 983 * Clean up a dead client connections. 984 */ 985void rxrpc_put_client_conn(struct rxrpc_connection *conn) 986{ 987 const void *here = __builtin_return_address(0); | 217 __builtin_return_address(0)); 218 trace_rxrpc_client(conn, -1, rxrpc_client_alloc); 219 _leave(" = %p", conn); 220 return conn; 221 222error_2: 223 conn->security->clear(conn); 224error_1: --- 756 unchanged lines hidden (view full) --- 981} 982 983/* 984 * Clean up a dead client connections. 985 */ 986void rxrpc_put_client_conn(struct rxrpc_connection *conn) 987{ 988 const void *here = __builtin_return_address(0); |
989 unsigned int debug_id = conn->debug_id; |
|
988 int n; 989 990 do { 991 n = atomic_dec_return(&conn->usage); | 990 int n; 991 992 do { 993 n = atomic_dec_return(&conn->usage); |
992 trace_rxrpc_conn(conn, rxrpc_conn_put_client, n, here); | 994 trace_rxrpc_conn(debug_id, rxrpc_conn_put_client, n, here); |
993 if (n > 0) 994 return; 995 ASSERTCMP(n, >=, 0); 996 997 conn = rxrpc_put_one_client_conn(conn); 998 } while (conn); 999} 1000 --- 208 unchanged lines hidden --- | 995 if (n > 0) 996 return; 997 ASSERTCMP(n, >=, 0); 998 999 conn = rxrpc_put_one_client_conn(conn); 1000 } while (conn); 1001} 1002 --- 208 unchanged lines hidden --- |