Skip to content

Commit

Permalink
rxrpc: Fix switched parameters in peer tracing
Browse files Browse the repository at this point in the history
Fix the switched parameters on rxrpc_alloc_peer() and rxrpc_get_peer().
The ref argument and the why argument got mixed.

Fixes: 47c810a ("rxrpc: trace: Don't use __builtin_return_address for rxrpc_peer tracing")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Howells authored and David S. Miller committed Dec 19, 2022
1 parent 608aecd commit c838f1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/trace/events/rxrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ TRACE_EVENT(rxrpc_peer,
TP_STRUCT__entry(
__field(unsigned int, peer )
__field(int, ref )
__field(int, why )
__field(enum rxrpc_peer_trace, why )
),

TP_fast_assign(
Expand Down
4 changes: 2 additions & 2 deletions net/rxrpc/peer_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct rxrpc_peer *rxrpc_alloc_peer(struct rxrpc_local *local, gfp_t gfp,
rxrpc_peer_init_rtt(peer);

peer->cong_ssthresh = RXRPC_TX_MAX_WINDOW;
trace_rxrpc_peer(peer->debug_id, why, 1);
trace_rxrpc_peer(peer->debug_id, 1, why);
}

_leave(" = %p", peer);
Expand Down Expand Up @@ -382,7 +382,7 @@ struct rxrpc_peer *rxrpc_get_peer(struct rxrpc_peer *peer, enum rxrpc_peer_trace
int r;

__refcount_inc(&peer->ref, &r);
trace_rxrpc_peer(peer->debug_id, why, r + 1);
trace_rxrpc_peer(peer->debug_id, r + 1, why);
return peer;
}

Expand Down

0 comments on commit c838f1a

Please sign in to comment.