Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315780
b: refs/heads/master
c: a353e0c
h: refs/heads/master
v: v3
  • Loading branch information
Michael S. Tsirkin authored and David S. Miller committed Jul 22, 2012
1 parent e860053 commit 2414bc2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d47e12d63e745f667a977226c3f59ae14521592d
refs/heads/master: a353e0ce0fd42d8859260666d1e9b10f2abd4698
16 changes: 16 additions & 0 deletions trunk/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -1666,6 +1666,22 @@ static inline void skb_orphan(struct sk_buff *skb)
skb->sk = NULL;
}

/**
* skb_orphan_frags - orphan the frags contained in a buffer
* @skb: buffer to orphan frags from
* @gfp_mask: allocation mask for replacement pages
*
* For each frag in the SKB which needs a destructor (i.e. has an
* owner) create a copy of that frag and release the original
* page by calling the destructor.
*/
static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask)
{
if (likely(!(skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY)))
return 0;
return skb_copy_ubufs(skb, gfp_mask);
}

/**
* __skb_queue_purge - empty a list
* @list: list to empty
Expand Down

0 comments on commit 2414bc2

Please sign in to comment.