Commit 4e33e346 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: use page_ref_inc() in tcp_sendmsg()

sk_page_frag_refill() allocates either a compound page or an order-0
page. We can use page_ref_inc() which is slightly faster than get_page()
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a4ecb15a
......@@ -1288,7 +1288,7 @@ int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
} else {
skb_fill_page_desc(skb, i, pfrag->page,
pfrag->offset, copy);
get_page(pfrag->page);
page_ref_inc(pfrag->page);
}
pfrag->offset += copy;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment