summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-02-17 18:11:42 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-17 21:31:06 +0100
commit4e33e34625103593a71d2bae471ce49cef62ef06 (patch)
tree06d29484bfebbee057e0a28baf9ec6b9bebab3ff /net
parenttcp: accommodate sequence number to a peer's shrunk receive window caused by ... (diff)
downloadlinux-4e33e34625103593a71d2bae471ce49cef62ef06.tar.xz
linux-4e33e34625103593a71d2bae471ce49cef62ef06.zip
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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp.c2
1 files changed, 1 insertions, 1 deletions
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;
}