Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
[muen/linux.git] / net / ipv4 / tcp.c
index e553f84bde83dba139f18400065bfec21a9b14f6..d763fae1b574187908fc7882e38ff979f9c09623 100644 (file)
@@ -994,7 +994,9 @@ new_segment:
                        get_page(page);
                        skb_fill_page_desc(skb, i, page, offset, copy);
                }
-               skb_shinfo(skb)->tx_flags |= SKBTX_SHARED_FRAG;
+
+               if (!(flags & MSG_NO_SHARED_FRAGS))
+                       skb_shinfo(skb)->tx_flags |= SKBTX_SHARED_FRAG;
 
                skb->len += copy;
                skb->data_len += copy;