Skip to content

Commit 4636cf1

Browse files
committed
afs: Fix some tracing details
Fix a couple of tracelines to indicate the usage count after the atomic op, not the usage count before it to be consistent with other afs and rxrpc trace lines. Change the wording of the afs_call_trace_work trace ID label from "WORK" to "QUEUE" to reflect the fact that it's queueing work, not doing work. Fixes: 341f741 ("afs: Refcount the afs_call struct") Signed-off-by: David Howells <dhowells@redhat.com>
1 parent 498b577 commit 4636cf1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎fs/afs/rxrpc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void afs_put_call(struct afs_call *call)
169169
int n = atomic_dec_return(&call->usage);
170170
int o = atomic_read(&net->nr_outstanding_calls);
171171

172-
trace_afs_call(call, afs_call_trace_put, n + 1, o,
172+
trace_afs_call(call, afs_call_trace_put, n, o,
173173
__builtin_return_address(0));
174174

175175
ASSERTCMP(n, >=, 0);
@@ -736,7 +736,7 @@ static void afs_wake_up_async_call(struct sock *sk, struct rxrpc_call *rxcall,
736736

737737
u = atomic_fetch_add_unless(&call->usage, 1, 0);
738738
if (u != 0) {
739-
trace_afs_call(call, afs_call_trace_wake, u,
739+
trace_afs_call(call, afs_call_trace_wake, u + 1,
740740
atomic_read(&call->net->nr_outstanding_calls),
741741
__builtin_return_address(0));
742742

‎include/trace/events/afs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ enum afs_cb_break_reason {
233233
EM(afs_call_trace_get, "GET ") \
234234
EM(afs_call_trace_put, "PUT ") \
235235
EM(afs_call_trace_wake, "WAKE ") \
236-
E_(afs_call_trace_work, "WORK ")
236+
E_(afs_call_trace_work, "QUEUE")
237237

238238
#define afs_server_traces \
239239
EM(afs_server_trace_alloc, "ALLOC ") \

0 commit comments

Comments
 (0)