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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user