net: remove skb_free_datagram_locked()
Last user of skb_free_datagram_locked() went away in 2016
with commit 850cbaddb5
("udp: use it's own memory
accounting schema").
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240325134155.620531-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
1a3e4d6a75
commit
6e06312035
@ -4063,12 +4063,6 @@ int skb_copy_datagram_from_iter(struct sk_buff *skb, int offset,
|
||||
struct iov_iter *from, int len);
|
||||
int zerocopy_sg_from_iter(struct sk_buff *skb, struct iov_iter *frm);
|
||||
void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
|
||||
void __skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb, int len);
|
||||
static inline void skb_free_datagram_locked(struct sock *sk,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
__skb_free_datagram_locked(sk, skb, 0);
|
||||
}
|
||||
int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags);
|
||||
int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len);
|
||||
int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len);
|
||||
|
@ -324,25 +324,6 @@ void skb_free_datagram(struct sock *sk, struct sk_buff *skb)
|
||||
}
|
||||
EXPORT_SYMBOL(skb_free_datagram);
|
||||
|
||||
void __skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb, int len)
|
||||
{
|
||||
bool slow;
|
||||
|
||||
if (!skb_unref(skb)) {
|
||||
sk_peek_offset_bwd(sk, len);
|
||||
return;
|
||||
}
|
||||
|
||||
slow = lock_sock_fast(sk);
|
||||
sk_peek_offset_bwd(sk, len);
|
||||
skb_orphan(skb);
|
||||
unlock_sock_fast(sk, slow);
|
||||
|
||||
/* skb is now orphaned, can be freed outside of locked section */
|
||||
__kfree_skb(skb);
|
||||
}
|
||||
EXPORT_SYMBOL(__skb_free_datagram_locked);
|
||||
|
||||
int __sk_queue_drop_skb(struct sock *sk, struct sk_buff_head *sk_queue,
|
||||
struct sk_buff *skb, unsigned int flags,
|
||||
void (*destructor)(struct sock *sk,
|
||||
|
Loading…
Reference in New Issue
Block a user