Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[linux-2.6-microblaze.git] / net / ipv4 / tcp.c
index ed28055..bae4284 100644 (file)
@@ -972,7 +972,8 @@ ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset,
        long timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
 
        if (IS_ENABLED(CONFIG_DEBUG_VM) &&
-           WARN_ONCE(PageSlab(page), "page must not be a Slab one"))
+           WARN_ONCE(!sendpage_ok(page),
+                     "page must not be a Slab one and have page_count > 0"))
                return -EINVAL;
 
        /* Wait for a connection to finish. One exception is TCP Fast Open