]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NET]: fix __sk_stream_mem_reclaim
authorIan McDonald <ian.mcdonald@jandi.co.nz>
Thu, 13 Jul 2006 00:58:53 +0000 (17:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Jul 2006 00:58:53 +0000 (17:58 -0700)
__sk_stream_mem_reclaim is only called by sk_stream_mem_reclaim.

As such the check on sk->sk_forward_alloc is not needed and can be
removed.

Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/stream.c

index e9489696f694540bfb90d12aba6e1cd3c5dd1d57..d1d7decf70b0087af2de9358049e5e43ed46d326 100644 (file)
@@ -196,15 +196,13 @@ EXPORT_SYMBOL(sk_stream_error);
 
 void __sk_stream_mem_reclaim(struct sock *sk)
 {
-       if (sk->sk_forward_alloc >= SK_STREAM_MEM_QUANTUM) {
-               atomic_sub(sk->sk_forward_alloc / SK_STREAM_MEM_QUANTUM,
-                          sk->sk_prot->memory_allocated);
-               sk->sk_forward_alloc &= SK_STREAM_MEM_QUANTUM - 1;
-               if (*sk->sk_prot->memory_pressure &&
-                   (atomic_read(sk->sk_prot->memory_allocated) <
-                    sk->sk_prot->sysctl_mem[0]))
-                       *sk->sk_prot->memory_pressure = 0;
-       }
+       atomic_sub(sk->sk_forward_alloc / SK_STREAM_MEM_QUANTUM,
+                  sk->sk_prot->memory_allocated);
+       sk->sk_forward_alloc &= SK_STREAM_MEM_QUANTUM - 1;
+       if (*sk->sk_prot->memory_pressure &&
+           (atomic_read(sk->sk_prot->memory_allocated) <
+            sk->sk_prot->sysctl_mem[0]))
+               *sk->sk_prot->memory_pressure = 0;
 }
 
 EXPORT_SYMBOL(__sk_stream_mem_reclaim);