Patchwork net: access page->private by using page_private

login
register
mail settings
Submitter Sunghan Suh
Date July 12, 2013, 7:17 a.m.
Message ID <1373613443-17444-1-git-send-email-sunghan.suh@samsung.com>
Download mbox | patch
Permalink /patch/258704/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sunghan Suh - July 12, 2013, 7:17 a.m.
Signed-off-by: Sunghan Suh <sunghan.suh@samsung.com>
---
 net/core/skbuff.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
David Miller - July 12, 2013, 11:10 p.m.
From: Sunghan Suh <sunghan.suh@samsung.com>
Date: Fri, 12 Jul 2013 16:17:23 +0900

> Signed-off-by: Sunghan Suh <sunghan.suh@samsung.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 77971a3..286607b 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -823,7 +823,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;
 			}
@@ -833,7 +833,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;
 	}
 
@@ -847,7 +847,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;