You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
net: add function to allocate sk_buff head without data area
Add a function to allocate a sk_buff head without any data. This will be used by memory mapped netlink to attach data from the mmaped area to the skb. Additionally change skb_release_all() to check whether the skb has a data area to allow the skb destructor to clear the data pointer in case only a head has been allocated. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e32123e598
commit
0ebd0ac5ff
@@ -651,6 +651,12 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
|
||||
return __alloc_skb(size, priority, SKB_ALLOC_FCLONE, NUMA_NO_NODE);
|
||||
}
|
||||
|
||||
extern struct sk_buff *__alloc_skb_head(gfp_t priority, int node);
|
||||
static inline struct sk_buff *alloc_skb_head(gfp_t priority)
|
||||
{
|
||||
return __alloc_skb_head(priority, -1);
|
||||
}
|
||||
|
||||
extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
|
||||
extern int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask);
|
||||
extern struct sk_buff *skb_clone(struct sk_buff *skb,
|
||||
|
||||
Reference in New Issue
Block a user