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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user