* [PATCH] can: use sock_efree instead of own destructor
@ 2015-03-10 3:48 Florian Westphal
2015-03-10 7:50 ` Marc Kleine-Budde
0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2015-03-10 3:48 UTC (permalink / raw)
To: linux-kernel; +Cc: socketcan, mkl, Florian Westphal
It is identical to the can destructor.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
include/linux/can/skb.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h
index cc00d15..b6a52a4 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;
}
}
--
2.0.5
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-10 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10 3:48 [PATCH] can: use sock_efree instead of own destructor Florian Westphal
2015-03-10 7:50 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome