|
|
@@ -97,7 +97,7 @@ static struct rxrpc_local *rxrpc_alloc_local(struct rxrpc_net *rxnet,
|
|
|
local->debug_id = atomic_inc_return(&rxrpc_debug_id);
|
|
|
memcpy(&local->srx, srx, sizeof(*srx));
|
|
|
local->srx.srx_service = 0;
|
|
|
- trace_rxrpc_local(local, rxrpc_local_new, 1, NULL);
|
|
|
+ trace_rxrpc_local(local->debug_id, rxrpc_local_new, 1, NULL);
|
|
|
}
|
|
|
|
|
|
_leave(" = %p", local);
|
|
|
@@ -325,7 +325,7 @@ struct rxrpc_local *rxrpc_get_local(struct rxrpc_local *local)
|
|
|
int n;
|
|
|
|
|
|
n = atomic_inc_return(&local->usage);
|
|
|
- trace_rxrpc_local(local, rxrpc_local_got, n, here);
|
|
|
+ trace_rxrpc_local(local->debug_id, rxrpc_local_got, n, here);
|
|
|
return local;
|
|
|
}
|
|
|
|
|
|
@@ -339,7 +339,8 @@ struct rxrpc_local *rxrpc_get_local_maybe(struct rxrpc_local *local)
|
|
|
if (local) {
|
|
|
int n = atomic_fetch_add_unless(&local->usage, 1, 0);
|
|
|
if (n > 0)
|
|
|
- trace_rxrpc_local(local, rxrpc_local_got, n + 1, here);
|
|
|
+ trace_rxrpc_local(local->debug_id, rxrpc_local_got,
|
|
|
+ n + 1, here);
|
|
|
else
|
|
|
local = NULL;
|
|
|
}
|
|
|
@@ -347,16 +348,16 @@ struct rxrpc_local *rxrpc_get_local_maybe(struct rxrpc_local *local)
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
- * Queue a local endpoint unless it has become unreferenced and pass the
|
|
|
- * caller's reference to the work item.
|
|
|
+ * Queue a local endpoint and pass the caller's reference to the work item.
|
|
|
*/
|
|
|
void rxrpc_queue_local(struct rxrpc_local *local)
|
|
|
{
|
|
|
const void *here = __builtin_return_address(0);
|
|
|
+ unsigned int debug_id = local->debug_id;
|
|
|
+ int n = atomic_read(&local->usage);
|
|
|
|
|
|
if (rxrpc_queue_work(&local->processor))
|
|
|
- trace_rxrpc_local(local, rxrpc_local_queued,
|
|
|
- atomic_read(&local->usage), here);
|
|
|
+ trace_rxrpc_local(debug_id, rxrpc_local_queued, n, here);
|
|
|
else
|
|
|
rxrpc_put_local(local);
|
|
|
}
|
|
|
@@ -371,7 +372,7 @@ void rxrpc_put_local(struct rxrpc_local *local)
|
|
|
|
|
|
if (local) {
|
|
|
n = atomic_dec_return(&local->usage);
|
|
|
- trace_rxrpc_local(local, rxrpc_local_put, n, here);
|
|
|
+ trace_rxrpc_local(local->debug_id, rxrpc_local_put, n, here);
|
|
|
|
|
|
if (n == 0)
|
|
|
call_rcu(&local->rcu, rxrpc_local_rcu);
|
|
|
@@ -458,7 +459,7 @@ static void rxrpc_local_processor(struct work_struct *work)
|
|
|
container_of(work, struct rxrpc_local, processor);
|
|
|
bool again;
|
|
|
|
|
|
- trace_rxrpc_local(local, rxrpc_local_processing,
|
|
|
+ trace_rxrpc_local(local->debug_id, rxrpc_local_processing,
|
|
|
atomic_read(&local->usage), NULL);
|
|
|
|
|
|
do {
|