aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-19 18:41:03 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-19 18:41:03 -0400
commit2a64255019e13dd975f1487cec32b873bcb76da6 (patch)
tree81c6fef1eb709a528bec87e9e26070a06050a434 /net/rxrpc
parentc9d10c497c3728a5c798c11486dccdc01b2092a8 (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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/ar-peer.c
index b6ff06351d67..2754f098d436 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)
157 /* we can now add the new candidate to the list */ 157 /* we can now add the new candidate to the list */
158 peer = candidate; 158 peer = candidate;
159 candidate = NULL; 159 candidate = NULL;
160 usage = atomic_read(&peer->usage);
160 161
161 list_add_tail(&peer->link, &rxrpc_peers); 162 list_add_tail(&peer->link, &rxrpc_peers);
162 write_unlock_bh(&rxrpc_peer_lock); 163 write_unlock_bh(&rxrpc_peer_lock);
@@ -171,7 +172,7 @@ success:
171 &peer->srx.transport.sin.sin_addr, 172 &peer->srx.transport.sin.sin_addr,
172 ntohs(peer->srx.transport.sin.sin_port)); 173 ntohs(peer->srx.transport.sin.sin_port));
173 174
174 _leave(" = %p {u=%d}", peer, atomic_read(&peer->usage)); 175 _leave(" = %p {u=%d}", peer, usage);
175 return peer; 176 return peer;
176 177
177 /* we found the peer in the list immediately */ 178 /* we found the peer in the list immediately */