summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/local_object.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-04-04 15:00:38 +0200
committerDavid Howells <dhowells@redhat.com>2016-06-22 10:17:51 +0200
commit5627cc8b961e4b07d5d649d9bd01ac929dcc1a95 (patch)
treea56752e988d6e458623e5f1f660b4b95d195007f /net/rxrpc/local_object.c
parentrxrpc: Make rxrpc_send_packet() take a connection not a transport (diff)
downloadlinux-5627cc8b961e4b07d5d649d9bd01ac929dcc1a95.tar.xz
linux-5627cc8b961e4b07d5d649d9bd01ac929dcc1a95.zip
rxrpc: Provide more refcount helper functions
Provide refcount helper functions for connections so that the code doesn't touch local or connection usage counts directly. Also make it such that local and peer put functions can take a NULL pointer. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/local_object.c')
-rw-r--r--net/rxrpc/local_object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
index 009b321712bc..5703b0d18ed4 100644
--- a/net/rxrpc/local_object.c
+++ b/net/rxrpc/local_object.c
@@ -209,7 +209,7 @@ struct rxrpc_local *rxrpc_lookup_local(const struct sockaddr_rxrpc *srx)
* bind the transport socket may still fail if we're attempting
* to use a local address that the dying object is still using.
*/
- if (!atomic_inc_not_zero(&local->usage)) {
+ if (!rxrpc_get_local_maybe(local)) {
cursor = cursor->next;
list_del_init(&local->link);
break;