Commit a2cf3264 authored by David Howells's avatar David Howells
Browse files

rxrpc: Fold __rxrpc_unuse_local() into rxrpc_unuse_local()



Fold __rxrpc_unuse_local() into rxrpc_unuse_local() as the latter is now
the only user of the former.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
parent 5086d9a9
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -1002,18 +1002,6 @@ void rxrpc_unuse_local(struct rxrpc_local *, enum rxrpc_local_trace);
void rxrpc_destroy_local(struct rxrpc_local *local);
void rxrpc_destroy_all_locals(struct rxrpc_net *);

static inline bool __rxrpc_unuse_local(struct rxrpc_local *local,
				       enum rxrpc_local_trace why)
{
	unsigned int debug_id = local->debug_id;
	int r, u;

	r = refcount_read(&local->ref);
	u = atomic_dec_return(&local->active_users);
	trace_rxrpc_local(debug_id, why, r, u);
	return u == 0;
}

static inline bool __rxrpc_use_local(struct rxrpc_local *local,
				     enum rxrpc_local_trace why)
{
+10 −2
Original line number Diff line number Diff line
@@ -359,9 +359,17 @@ struct rxrpc_local *rxrpc_use_local(struct rxrpc_local *local,
 */
void rxrpc_unuse_local(struct rxrpc_local *local, enum rxrpc_local_trace why)
{
	if (local && __rxrpc_unuse_local(local, why))
	unsigned int debug_id = local->debug_id;
	int r, u;

	if (local) {
		r = refcount_read(&local->ref);
		u = atomic_dec_return(&local->active_users);
		trace_rxrpc_local(debug_id, why, r, u);
		if (u == 0)
			kthread_stop(local->io_thread);
	}
}

/*
 * Destroy a local endpoint's socket and then hand the record to RCU to dispose