Commit 2a642550 authored by David S. Miller's avatar David S. Miller

rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().

I backed off from trying to just eliminate this variable, since
transforming atomic_inc_return() into atomic_inc() takes away
the memory barriers.
Signed-off-by: default avatarDavid S. Miller <>
parent c9d10c49
......@@ -157,6 +157,7 @@ struct rxrpc_peer *rxrpc_get_peer(struct sockaddr_rxrpc *srx, gfp_t gfp)
/* we can now add the new candidate to the list */
peer = candidate;
candidate = NULL;
usage = atomic_read(&peer->usage);
list_add_tail(&peer->link, &rxrpc_peers);
......@@ -171,7 +172,7 @@ success:
_leave(" = %p {u=%d}", peer, atomic_read(&peer->usage));
_leave(" = %p {u=%d}", peer, usage);
return peer;
/* we found the peer in the list immediately */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment