aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/can
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-03-09 23:48:20 -0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-03-22 18:50:10 -0400
commit2b290bbb60847c0897c047b5214192810de529df (patch)
tree25c533420bcf58db4ebcdb77fa3f641845add523 /include/linux/can
parent8f2ddaac302a8ca364cb04efb19cd3b5cd058910 (diff)
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>
Diffstat (limited to 'include/linux/can')
-rw-r--r--include/linux/can/skb.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h
index cc00d15c6107..b6a52a4b457a 100644
--- a/include/linux/can/skb.h
+++ b/include/linux/can/skb.h
@@ -44,16 +44,11 @@ static inline void can_skb_reserve(struct sk_buff *skb)
44 skb_reserve(skb, sizeof(struct can_skb_priv)); 44 skb_reserve(skb, sizeof(struct can_skb_priv));
45} 45}
46 46
47static inline void can_skb_destructor(struct sk_buff *skb)
48{
49 sock_put(skb->sk);
50}
51
52static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk) 47static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk)
53{ 48{
54 if (sk) { 49 if (sk) {
55 sock_hold(sk); 50 sock_hold(sk);
56 skb->destructor = can_skb_destructor; 51 skb->destructor = sock_efree;
57 skb->sk = sk; 52 skb->sk = sk;
58 } 53 }
59} 54}