提交 0a57ec62 编写于 作者: J Jason Wang 提交者: David S. Miller

net: use skb_fill_page_desc() in zerocopy_sg_from_iovec()

Signed-off-by: NJason Wang <jasowang@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c3bdeb5c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册