can: use sock_efree instead of own destructor
authorFlorian Westphal <fw@strlen.de>
Tue, 10 Mar 2015 03:48:20 +0000 (04:48 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 22 Mar 2015 22:50:10 +0000 (23:50 +0100)
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>
include/linux/can/skb.h

index cc00d15c6107be8893b024e3eabb2ef1ba243016..b6a52a4b457aaaff2db3f55e2fd3bb78d07a6ab1 100644 (file)
@@ -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;
        }
 }