rxrpc: Use rxrpc_free_skb() rather than rxrpc_lose_skb()
authorDavid Howells <dhowells@redhat.com>
Thu, 4 Oct 2018 08:32:27 +0000 (09:32 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 4 Oct 2018 08:32:27 +0000 (09:32 +0100)
rxrpc_lose_skb() is now exactly the same as rxrpc_free_skb(), so remove it
and use the latter instead.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/ar-internal.h
net/rxrpc/input.c
net/rxrpc/skbuff.c

index ef9554131434496ae02ab6c47418c13ebbc3b239..9ba87e4d15c7403053ca0328b817cdd7ebc2a487 100644 (file)
@@ -1095,7 +1095,6 @@ void rxrpc_new_skb(struct sk_buff *, enum rxrpc_skb_trace);
 void rxrpc_see_skb(struct sk_buff *, enum rxrpc_skb_trace);
 void rxrpc_get_skb(struct sk_buff *, enum rxrpc_skb_trace);
 void rxrpc_free_skb(struct sk_buff *, enum rxrpc_skb_trace);
-void rxrpc_lose_skb(struct sk_buff *, enum rxrpc_skb_trace);
 void rxrpc_purge_queue(struct sk_buff_head *);
 
 /*
index 4b86b6be6c1f635aa5305e2d88b1be1335cbfb4e..5b2626929822b6d9daba55c7abbd79195834f7ba 100644 (file)
@@ -1176,7 +1176,7 @@ void rxrpc_data_ready(struct sock *udp_sk)
                static int lose;
                if ((lose++ & 7) == 7) {
                        trace_rxrpc_rx_lose(sp);
-                       rxrpc_lose_skb(skb, rxrpc_skb_rx_lost);
+                       rxrpc_free_skb(skb, rxrpc_skb_rx_lost);
                        return;
                }
        }
index b8985d01876a27168fbdc411208aa2984535557b..913dca65cc6573d646f54a9583b9dbc5d7f6f017 100644 (file)
@@ -68,21 +68,6 @@ void rxrpc_free_skb(struct sk_buff *skb, enum rxrpc_skb_trace op)
        }
 }
 
-/*
- * Note the injected loss of a socket buffer.
- */
-void rxrpc_lose_skb(struct sk_buff *skb, enum rxrpc_skb_trace op)
-{
-       const void *here = __builtin_return_address(0);
-       if (skb) {
-               int n;
-               CHECK_SLAB_OKAY(&skb->users);
-               n = atomic_dec_return(select_skb_count(op));
-               trace_rxrpc_skb(skb, op, refcount_read(&skb->users), n, here);
-               kfree_skb(skb);
-       }
-}
-
 /*
  * Clear a queue of socket buffers.
  */