diff options
Diffstat (limited to 'drivers/net/macvtap.c')
-rw-r--r-- | drivers/net/macvtap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index ab96c319a240..7c3f84acfdfb 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
@@ -503,10 +503,10 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from, | |||
503 | skb->truesize += len; | 503 | skb->truesize += len; |
504 | atomic_add(len, &skb->sk->sk_wmem_alloc); | 504 | atomic_add(len, &skb->sk->sk_wmem_alloc); |
505 | while (len) { | 505 | while (len) { |
506 | f = &skb_shinfo(skb)->frags[i]; | 506 | __skb_fill_page_desc( |
507 | f->page = page[i]; | 507 | skb, i, page[i], |
508 | f->page_offset = base & ~PAGE_MASK; | 508 | base & ~PAGE_MASK, |
509 | f->size = min_t(int, len, PAGE_SIZE - f->page_offset); | 509 | min_t(int, len, PAGE_SIZE - f->page_offset)); |
510 | skb_shinfo(skb)->nr_frags++; | 510 | skb_shinfo(skb)->nr_frags++; |
511 | /* increase sk_wmem_alloc */ | 511 | /* increase sk_wmem_alloc */ |
512 | base += f->size; | 512 | base += f->size; |