]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
tcp: use page_ref_inc() in tcp_sendmsg()
authorEric Dumazet <edumazet@google.com>
Fri, 17 Feb 2017 17:11:42 +0000 (09:11 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Feb 2017 20:31:06 +0000 (15:31 -0500)
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>
net/ipv4/tcp.c

index d44a6989e76d69aa44e2a26d37b4204376c94966..da385ae997a3d61f0217a2e585088a82e6d50cd3 100644 (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;
                }