Skip to content

Commit

Permalink
can: use sock_efree instead of own destructor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Westphal authored and Marc Kleine-Budde committed Mar 22, 2015
1 parent 8f2ddaa commit 2b290bb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions include/linux/can/skb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 2b290bb

Please sign in to comment.