diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2011-10-19 23:01:49 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-21 02:52:53 -0400 |
commit | a8605c6063f785858c1bc431d0bfe66c41e71cfa (patch) | |
tree | 42ce7ce9a1679f09b54353dd1ea05a6581abe754 /net/core | |
parent | 6a39a16a5ac07a156de91cfb9422bde574e59fa6 (diff) | |
download | lwn-a8605c6063f785858c1bc431d0bfe66c41e71cfa.tar.gz lwn-a8605c6063f785858c1bc431d0bfe66c41e71cfa.zip |
net: add opaque struct around skb frag page
I've split this bit out of the skb frag destructor patch since it helps enforce
the use of the fragment API.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/skbuff.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index e27104039a39..ca4db40e75b8 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -668,14 +668,14 @@ int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask) /* skb frags release userspace buffers */ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) - put_page(skb_shinfo(skb)->frags[i].page); + skb_frag_unref(skb, i); uarg->callback(uarg); /* skb frags point to kernel buffers */ for (i = skb_shinfo(skb)->nr_frags; i > 0; i--) { - skb_shinfo(skb)->frags[i - 1].page_offset = 0; - skb_shinfo(skb)->frags[i - 1].page = head; + __skb_fill_page_desc(skb, i-1, head, 0, + skb_shinfo(skb)->frags[i - 1].size); head = (struct page *)head->private; } |