aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index e51e626e9af1..cf628261da52 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1232,9 +1232,8 @@ static inline struct page *sk_stream_alloc_page(struct sock *sk)
1232{ 1232{
1233 struct page *page = NULL; 1233 struct page *page = NULL;
1234 1234
1235 if (sk_stream_wmem_schedule(sk, PAGE_SIZE)) 1235 page = alloc_pages(sk->sk_allocation, 0);
1236 page = alloc_pages(sk->sk_allocation, 0); 1236 if (!page) {
1237 else {
1238 sk->sk_prot->enter_memory_pressure(); 1237 sk->sk_prot->enter_memory_pressure();
1239 sk_stream_moderate_sndbuf(sk); 1238 sk_stream_moderate_sndbuf(sk);
1240 } 1239 }