LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [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

* Re: [PATCH] can: use sock_efree instead of own destructor
  2015-03-10  3:48 [PATCH] can: use sock_efree instead of own destructor Florian Westphal
@ 2015-03-10  7:50 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2015-03-10  7:50 UTC (permalink / raw)
  To: Florian Westphal, linux-kernel; +Cc: socketcan, linux-can

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

On 03/10/2015 04:48 AM, Florian Westphal wrote:
> It is identical to the can destructor.
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>

Thanks, applied to can-next.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ 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;
as well as URLs for NNTP newsgroup(s).