From 78a0579b244868506c99756bbe597e9784c1112a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Thu, 27 Mar 2008 17:54:01 -0700 Subject: [PATCH] --- yaml --- r: 90421 b: refs/heads/master c: 419ae74ecc9494e58928a5c6652f4c072f3ca744 h: refs/heads/master i: 90419: d2e9ae0ad8c9c2544c31c08f7d763756d135e222 v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 16 +--------------- trunk/net/core/skbuff.c | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index dc0eca9d23ce..67d353064eff 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8d3308687f7f1eaa1bb5d202d14752d5f90068eb +refs/heads/master: 419ae74ecc9494e58928a5c6652f4c072f3ca744 diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index 1baf4d43bb2d..ff72145d5d9e 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -1158,21 +1158,7 @@ static inline void __skb_trim(struct sk_buff *skb, unsigned int len) skb_set_tail_pointer(skb, len); } -/** - * skb_trim - remove end from a buffer - * @skb: buffer to alter - * @len: new length - * - * Cut the length of a buffer down by removing data from the tail. If - * the buffer is already under the length specified it is not modified. - * The skb must be linear. - */ -static inline void skb_trim(struct sk_buff *skb, unsigned int len) -{ - if (skb->len > len) - __skb_trim(skb, len); -} - +extern void skb_trim(struct sk_buff *skb, unsigned int len); static inline int __pskb_trim(struct sk_buff *skb, unsigned int len) { diff --git a/trunk/net/core/skbuff.c b/trunk/net/core/skbuff.c index a37127b5899c..86e5682728be 100644 --- a/trunk/net/core/skbuff.c +++ b/trunk/net/core/skbuff.c @@ -931,6 +931,22 @@ unsigned char *skb_pull(struct sk_buff *skb, unsigned int len) } EXPORT_SYMBOL(skb_pull); +/** + * skb_trim - remove end from a buffer + * @skb: buffer to alter + * @len: new length + * + * Cut the length of a buffer down by removing data from the tail. If + * the buffer is already under the length specified it is not modified. + * The skb must be linear. + */ +void skb_trim(struct sk_buff *skb, unsigned int len) +{ + if (skb->len > len) + __skb_trim(skb, len); +} +EXPORT_SYMBOL(skb_trim); + /* Trims skb to length len. It can change skb pointers. */