diff options
author | David Howells <dhowells@redhat.com> | 2018-10-04 04:32:27 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-10-04 04:32:27 -0400 |
commit | d2944b1c66a502ada8aa67f508cd29ecbf035892 (patch) | |
tree | fe330bcab99215fff58ecd65a9717968db962ced /net/rxrpc | |
parent | 6f41617bf23a17d9cb7cc6ca8161534f05f80293 (diff) |
rxrpc: Use rxrpc_free_skb() rather than rxrpc_lose_skb()
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>
Diffstat (limited to 'net/rxrpc')
-rw-r--r-- | net/rxrpc/ar-internal.h | 1 | ||||
-rw-r--r-- | net/rxrpc/input.c | 2 | ||||
-rw-r--r-- | net/rxrpc/skbuff.c | 15 |
3 files changed, 1 insertions, 17 deletions
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index ef9554131434..9ba87e4d15c7 100644 --- a/net/rxrpc/ar-internal.h +++ b/net/rxrpc/ar-internal.h | |||
@@ -1095,7 +1095,6 @@ void rxrpc_new_skb(struct sk_buff *, enum rxrpc_skb_trace); | |||
1095 | void rxrpc_see_skb(struct sk_buff *, enum rxrpc_skb_trace); | 1095 | void rxrpc_see_skb(struct sk_buff *, enum rxrpc_skb_trace); |
1096 | void rxrpc_get_skb(struct sk_buff *, enum rxrpc_skb_trace); | 1096 | void rxrpc_get_skb(struct sk_buff *, enum rxrpc_skb_trace); |
1097 | void rxrpc_free_skb(struct sk_buff *, enum rxrpc_skb_trace); | 1097 | void rxrpc_free_skb(struct sk_buff *, enum rxrpc_skb_trace); |
1098 | void rxrpc_lose_skb(struct sk_buff *, enum rxrpc_skb_trace); | ||
1099 | void rxrpc_purge_queue(struct sk_buff_head *); | 1098 | void rxrpc_purge_queue(struct sk_buff_head *); |
1100 | 1099 | ||
1101 | /* | 1100 | /* |
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 4b86b6be6c1f..5b2626929822 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c | |||
@@ -1176,7 +1176,7 @@ void rxrpc_data_ready(struct sock *udp_sk) | |||
1176 | static int lose; | 1176 | static int lose; |
1177 | if ((lose++ & 7) == 7) { | 1177 | if ((lose++ & 7) == 7) { |
1178 | trace_rxrpc_rx_lose(sp); | 1178 | trace_rxrpc_rx_lose(sp); |
1179 | rxrpc_lose_skb(skb, rxrpc_skb_rx_lost); | 1179 | rxrpc_free_skb(skb, rxrpc_skb_rx_lost); |
1180 | return; | 1180 | return; |
1181 | } | 1181 | } |
1182 | } | 1182 | } |
diff --git a/net/rxrpc/skbuff.c b/net/rxrpc/skbuff.c index b8985d01876a..913dca65cc65 100644 --- a/net/rxrpc/skbuff.c +++ b/net/rxrpc/skbuff.c | |||
@@ -69,21 +69,6 @@ void rxrpc_free_skb(struct sk_buff *skb, enum rxrpc_skb_trace op) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * Note the injected loss of a socket buffer. | ||
73 | */ | ||
74 | void rxrpc_lose_skb(struct sk_buff *skb, enum rxrpc_skb_trace op) | ||
75 | { | ||
76 | const void *here = __builtin_return_address(0); | ||
77 | if (skb) { | ||
78 | int n; | ||
79 | CHECK_SLAB_OKAY(&skb->users); | ||
80 | n = atomic_dec_return(select_skb_count(op)); | ||
81 | trace_rxrpc_skb(skb, op, refcount_read(&skb->users), n, here); | ||
82 | kfree_skb(skb); | ||
83 | } | ||
84 | } | ||
85 | |||
86 | /* | ||
87 | * Clear a queue of socket buffers. | 72 | * Clear a queue of socket buffers. |
88 | */ | 73 | */ |
89 | void rxrpc_purge_queue(struct sk_buff_head *list) | 74 | void rxrpc_purge_queue(struct sk_buff_head *list) |