rxrpc: Fold __rxrpc_unuse_local() into rxrpc_unuse_local()
authorDavid Howells <dhowells@redhat.com>
Wed, 16 Nov 2022 12:02:22 +0000 (12:02 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 1 Dec 2022 13:36:43 +0000 (13:36 +0000)
Fold __rxrpc_unuse_local() into rxrpc_unuse_local() as the latter is now
the only user of the former.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org

net/rxrpc/ar-internal.h
net/rxrpc/local_object.c

index 785cd0dd1eea15372903dc4cb27e90d5a410cc32..2a4928249a64ec5e031ba47d5890c9a42a59c012 100644 (file)
@@ -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)
 {
index c73a5a1bc0881a36da1925971947041cb029d6e9..1e994a83db2b4c58446ebceeec1a461f5733371b 100644 (file)
@@ -359,8 +359,16 @@ 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))
-               kthread_stop(local->io_thread);
+       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);
+       }
 }
 
 /*