From: Eric Dumazet Date: Fri, 17 Feb 2017 17:11:42 +0000 (-0800) Subject: tcp: use page_ref_inc() in tcp_sendmsg() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4e33e34625103593a71d2bae471ce49cef62ef06;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index d44a6989e76d..da385ae997a3 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1288,7 +1288,7 @@ new_segment: } else { skb_fill_page_desc(skb, i, pfrag->page, pfrag->offset, copy); - get_page(pfrag->page); + page_ref_inc(pfrag->page); } pfrag->offset += copy; }