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 <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2017-02-17 09:11:42 -08:00 committed by David S. Miller
parent a4ecb15a24
commit 4e33e34625
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}