mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 23:40:55 +07:00
can: use sock_efree instead of own destructor
It is identical to the can destructor. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
8f2ddaac30
commit
2b290bbb60
@ -44,16 +44,11 @@ static inline void can_skb_reserve(struct sk_buff *skb)
|
||||
skb_reserve(skb, sizeof(struct can_skb_priv));
|
||||
}
|
||||
|
||||
static inline void can_skb_destructor(struct sk_buff *skb)
|
||||
{
|
||||
sock_put(skb->sk);
|
||||
}
|
||||
|
||||
static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk)
|
||||
{
|
||||
if (sk) {
|
||||
sock_hold(sk);
|
||||
skb->destructor = can_skb_destructor;
|
||||
skb->destructor = sock_efree;
|
||||
skb->sk = sk;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user