Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
@@ -1637,20 +1637,16 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i,
|
||||
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
|
||||
|
||||
/*
|
||||
* Propagate page->pfmemalloc to the skb if we can. The problem is
|
||||
* that not all callers have unique ownership of the page. If
|
||||
* pfmemalloc is set, we check the mapping as a mapping implies
|
||||
* page->index is set (index and pfmemalloc share space).
|
||||
* If it's a valid mapping, we cannot use page->pfmemalloc but we
|
||||
* do not lose pfmemalloc information as the pages would not be
|
||||
* allocated using __GFP_MEMALLOC.
|
||||
* Propagate page pfmemalloc to the skb if we can. The problem is
|
||||
* that not all callers have unique ownership of the page but rely
|
||||
* on page_is_pfmemalloc doing the right thing(tm).
|
||||
*/
|
||||
frag->page.p = page;
|
||||
frag->page_offset = off;
|
||||
skb_frag_size_set(frag, size);
|
||||
|
||||
page = compound_head(page);
|
||||
if (page->pfmemalloc && !page->mapping)
|
||||
if (page_is_pfmemalloc(page))
|
||||
skb->pfmemalloc = true;
|
||||
}
|
||||
|
||||
@@ -2298,7 +2294,7 @@ static inline struct page *dev_alloc_page(void)
|
||||
static inline void skb_propagate_pfmemalloc(struct page *page,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
if (page && page->pfmemalloc)
|
||||
if (page_is_pfmemalloc(page))
|
||||
skb->pfmemalloc = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user