diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/skbuff.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c705808bef9c..1f50bfe2243d 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -744,7 +744,13 @@ struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); | |||
| 744 | int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask); | 744 | int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask); |
| 745 | struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t priority); | 745 | struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t priority); |
| 746 | struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t priority); | 746 | struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t priority); |
| 747 | struct sk_buff *__pskb_copy(struct sk_buff *skb, int headroom, gfp_t gfp_mask); | 747 | struct sk_buff *__pskb_copy_fclone(struct sk_buff *skb, int headroom, |
| 748 | gfp_t gfp_mask, bool fclone); | ||
| 749 | static inline struct sk_buff *__pskb_copy(struct sk_buff *skb, int headroom, | ||
| 750 | gfp_t gfp_mask) | ||
| 751 | { | ||
| 752 | return __pskb_copy_fclone(skb, headroom, gfp_mask, false); | ||
| 753 | } | ||
| 748 | 754 | ||
| 749 | int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, gfp_t gfp_mask); | 755 | int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, gfp_t gfp_mask); |
| 750 | struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, | 756 | struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, |
| @@ -2238,6 +2244,14 @@ static inline struct sk_buff *pskb_copy(struct sk_buff *skb, | |||
| 2238 | return __pskb_copy(skb, skb_headroom(skb), gfp_mask); | 2244 | return __pskb_copy(skb, skb_headroom(skb), gfp_mask); |
| 2239 | } | 2245 | } |
| 2240 | 2246 | ||
| 2247 | |||
| 2248 | static inline struct sk_buff *pskb_copy_for_clone(struct sk_buff *skb, | ||
| 2249 | gfp_t gfp_mask) | ||
| 2250 | { | ||
| 2251 | return __pskb_copy_fclone(skb, skb_headroom(skb), gfp_mask, true); | ||
| 2252 | } | ||
| 2253 | |||
| 2254 | |||
| 2241 | /** | 2255 | /** |
| 2242 | * skb_clone_writable - is the header of a clone writable | 2256 | * skb_clone_writable - is the header of a clone writable |
| 2243 | * @skb: buffer to check | 2257 | * @skb: buffer to check |
