diff options
Diffstat (limited to 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 0c67facf42f3..002939cfc069 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -339,11 +339,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
339 | unsigned long flags; | 339 | unsigned long flags; |
340 | struct sk_buff_head *list = &sk->sk_receive_queue; | 340 | struct sk_buff_head *list = &sk->sk_receive_queue; |
341 | 341 | ||
342 | /* Cast sk->rcvbuf to unsigned... It's pointless, but reduces | 342 | if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) { |
343 | number of warnings when compiling with -W --ANK | ||
344 | */ | ||
345 | if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= | ||
346 | (unsigned)sk->sk_rcvbuf) { | ||
347 | atomic_inc(&sk->sk_drops); | 343 | atomic_inc(&sk->sk_drops); |
348 | trace_sock_rcvqueue_full(sk, skb); | 344 | trace_sock_rcvqueue_full(sk, skb); |
349 | return -ENOMEM; | 345 | return -ENOMEM; |