aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/can
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-03-10 04:48:20 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-03-22 23:50:10 +0100
commit2b290bbb60847c0897c047b5214192810de529df (patch)
tree25c533420bcf58db4ebcdb77fa3f641845add523 /include/linux/can
parentnetlink: Remove netlink_compare_arg.trailer (diff)
downloadwireguard-linux-2b290bbb60847c0897c047b5214192810de529df.tar.xz
wireguard-linux-2b290bbb60847c0897c047b5214192810de529df.zip
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)
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;
}
}