From 0a57ec62dfa4b639d86aba60c236904def1d0356 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Tue, 6 Aug 2013 17:45:05 +0800 Subject: [PATCH] net: use skb_fill_page_desc() in zerocopy_sg_from_iovec() Signed-off-by: Jason Wang Signed-off-by: David S. Miller --- net/core/datagram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/datagram.c b/net/core/datagram.c index f987faef21ce..bec08672644a 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -652,8 +652,7 @@ int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from, while (len) { int off = base & ~PAGE_MASK; int size = min_t(int, len, PAGE_SIZE - off); - __skb_fill_page_desc(skb, i, page[i], off, size); - skb_shinfo(skb)->nr_frags++; + skb_fill_page_desc(skb, i, page[i], off, size); /* increase sk_wmem_alloc */ base += size; len -= size; -- 2.20.1