diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/skbuff.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 3573ba9a2555..755e9cddac47 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1040,6 +1040,21 @@ static inline int pskb_trim(struct sk_buff *skb, unsigned int len) | |||
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | /** | 1042 | /** |
1043 | * pskb_trim_unique - remove end from a paged unique (not cloned) buffer | ||
1044 | * @skb: buffer to alter | ||
1045 | * @len: new length | ||
1046 | * | ||
1047 | * This is identical to pskb_trim except that the caller knows that | ||
1048 | * the skb is not cloned so we should never get an error due to out- | ||
1049 | * of-memory. | ||
1050 | */ | ||
1051 | static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len) | ||
1052 | { | ||
1053 | int err = pskb_trim(skb, len); | ||
1054 | BUG_ON(err); | ||
1055 | } | ||
1056 | |||
1057 | /** | ||
1043 | * skb_orphan - orphan a buffer | 1058 | * skb_orphan - orphan a buffer |
1044 | * @skb: buffer to orphan | 1059 | * @skb: buffer to orphan |
1045 | * | 1060 | * |