diff options
| author | Anton Vorontsov <anton@enomsg.org> | 2013-03-25 07:06:35 +0400 |
|---|---|---|
| committer | Anton Vorontsov <anton@enomsg.org> | 2013-03-25 07:06:35 +0400 |
| commit | 6e997bb894beef128fcfe1679e0830f97dee6dc2 (patch) | |
| tree | 078d95af4d30b5e3d5b1db18de215489b26e01ce /include/linux/skbuff.h | |
| parent | c6cc9fc9d42ec82da2c770f0bef1488dc467f29c (diff) | |
| parent | 92413a9bee1299cedcc0e5cfbfbc6b42496fb817 (diff) | |
| download | linux-6e997bb894beef128fcfe1679e0830f97dee6dc2.tar.xz | |
Merge branch 'urgent'
Conflicts:
drivers/power/pm2301_charger.c
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 821c7f45d2a7..441f5bfdab8e 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -500,7 +500,7 @@ struct sk_buff { union { __u32 mark; __u32 dropcount; - __u32 avail_size; + __u32 reserved_tailroom; }; sk_buff_data_t inner_transport_header; @@ -1288,11 +1288,13 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i, * do not lose pfmemalloc information as the pages would not be * allocated using __GFP_MEMALLOC. */ - if (page->pfmemalloc && !page->mapping) - skb->pfmemalloc = true; frag->page.p = page; frag->page_offset = off; skb_frag_size_set(frag, size); + + page = compound_head(page); + if (page->pfmemalloc && !page->mapping) + skb->pfmemalloc = true; } /** @@ -1447,7 +1449,10 @@ static inline int skb_tailroom(const struct sk_buff *skb) */ static inline int skb_availroom(const struct sk_buff *skb) { - return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len; + if (skb_is_nonlinear(skb)) + return 0; + + return skb->end - skb->tail - skb->reserved_tailroom; } /** |
