Skip to content

Commit

Permalink
net: access page->private by using page_private
Browse files Browse the repository at this point in the history
Signed-off-by: Sunghan Suh <sunghan.suh@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sunghan Suh authored and David S. Miller committed Jul 12, 2013
1 parent 92338dc commit 40dadff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask)
page = alloc_page(gfp_mask);
if (!page) {
while (head) {
struct page *next = (struct page *)head->private;
struct page *next = (struct page *)page_private(head);
put_page(head);
head = next;
}
Expand All @@ -834,7 +834,7 @@ int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask)
memcpy(page_address(page),
vaddr + f->page_offset, skb_frag_size(f));
kunmap_atomic(vaddr);
page->private = (unsigned long)head;
set_page_private(page, (unsigned long)head);
head = page;
}

Expand All @@ -848,7 +848,7 @@ int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask)
for (i = num_frags - 1; i >= 0; i--) {
__skb_fill_page_desc(skb, i, head, 0,
skb_shinfo(skb)->frags[i].size);
head = (struct page *)head->private;
head = (struct page *)page_private(head);
}

skb_shinfo(skb)->tx_flags &= ~SKBTX_DEV_ZEROCOPY;
Expand Down

0 comments on commit 40dadff

Please sign in to comment.