]> err.no Git - linux-2.6/blobdiff - include/net/sock.h
[TCP]: Fix sk_forward_alloc underflow in tcp_sendmsg
[linux-2.6] / include / net / sock.h
index e51e626e9af183354544b6aac0057ed071345029..cf628261da521cba025d7401abb3d52900cb35ee 100644 (file)
@@ -1232,9 +1232,8 @@ static inline struct page *sk_stream_alloc_page(struct sock *sk)
 {
        struct page *page = NULL;
 
-       if (sk_stream_wmem_schedule(sk, PAGE_SIZE))
-               page = alloc_pages(sk->sk_allocation, 0);
-       else {
+       page = alloc_pages(sk->sk_allocation, 0);
+       if (!page) {
                sk->sk_prot->enter_memory_pressure();
                sk_stream_moderate_sndbuf(sk);
        }