diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-19 18:41:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-19 18:41:03 -0400 |
commit | 2a64255019e13dd975f1487cec32b873bcb76da6 (patch) | |
tree | 81c6fef1eb709a528bec87e9e26070a06050a434 /net/rxrpc | |
parent | c9d10c497c3728a5c798c11486dccdc01b2092a8 (diff) |
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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc')
-rw-r--r-- | net/rxrpc/ar-peer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/ar-peer.c index b6ff06351d6..2754f098d43 100644 --- a/net/rxrpc/ar-peer.c +++ b/net/rxrpc/ar-peer.c @@ -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); write_unlock_bh(&rxrpc_peer_lock); @@ -171,7 +172,7 @@ success: &peer->srx.transport.sin.sin_addr, ntohs(peer->srx.transport.sin.sin_port)); - _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 */ |