diff options
author | David Howells <dhowells@redhat.com> | 2016-04-04 14:00:38 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-06-22 09:17:51 +0100 |
commit | 5627cc8b961e4b07d5d649d9bd01ac929dcc1a95 (patch) | |
tree | a56752e988d6e458623e5f1f660b4b95d195007f /net/rxrpc/af_rxrpc.c | |
parent | 985a5c824a52e9f7cae59c850e2db98954f21c7c (diff) | |
download | op-kernel-dev-5627cc8b961e4b07d5d649d9bd01ac929dcc1a95.zip op-kernel-dev-5627cc8b961e4b07d5d649d9bd01ac929dcc1a95.tar.gz |
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/af_rxrpc.c')
-rw-r--r-- | net/rxrpc/af_rxrpc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index b29bb50..57dcbfc 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c @@ -674,11 +674,8 @@ static int rxrpc_release_sock(struct sock *sk) flush_workqueue(rxrpc_workqueue); rxrpc_purge_queue(&sk->sk_receive_queue); - if (rx->local) { - rxrpc_put_local(rx->local); - rx->local = NULL; - } - + rxrpc_put_local(rx->local); + rx->local = NULL; key_put(rx->key); rx->key = NULL; key_put(rx->securities); |