From: Andrew Morton It has many callsites. Cc: Arnaldo Carvalho de Melo Signed-off-by: Andrew Morton --- include/linux/skbuff.h | 20 +------------------- net/core/skbuff.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 19 deletions(-) diff -puN include/linux/skbuff.h~net-uninline-skb_put include/linux/skbuff.h --- a/include/linux/skbuff.h~net-uninline-skb_put +++ a/include/linux/skbuff.h @@ -829,25 +829,7 @@ static inline unsigned char *__skb_put(s return tmp; } -/** - * skb_put - add data to a buffer - * @skb: buffer to use - * @len: amount of data to add - * - * This function extends the used data area of the buffer. If this would - * exceed the total buffer size the kernel will panic. A pointer to the - * first byte of the extra data is returned. - */ -static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int len) -{ - unsigned char *tmp = skb->tail; - SKB_LINEAR_ASSERT(skb); - skb->tail += len; - skb->len += len; - if (unlikely(skb->tail>skb->end)) - skb_over_panic(skb, len, current_text_addr()); - return tmp; -} +unsigned char *skb_put(struct sk_buff *skb, unsigned int len); static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) { diff -puN net/core/skbuff.c~net-uninline-skb_put net/core/skbuff.c --- a/net/core/skbuff.c~net-uninline-skb_put +++ a/net/core/skbuff.c @@ -119,6 +119,27 @@ void skb_truesize_bug(struct sk_buff *sk } EXPORT_SYMBOL(skb_truesize_bug); +/** + * skb_put - add data to a buffer + * @skb: buffer to use + * @len: amount of data to add + * + * This function extends the used data area of the buffer. If this would + * exceed the total buffer size the kernel will panic. A pointer to the + * first byte of the extra data is returned. + */ +unsigned char *skb_put(struct sk_buff *skb, unsigned int len) +{ + unsigned char *tmp = skb->tail; + SKB_LINEAR_ASSERT(skb); + skb->tail += len; + skb->len += len; + if (unlikely(skb->tail>skb->end)) + skb_over_panic(skb, len, current_text_addr()); + return tmp; +} +EXPORT_SYMBOL(skb_put); + /* Allocate a new skbuff. We do this ourselves so we can fill in a few * 'private' fields and also do memory statistics to find all the * [BEEP] leaks. _