Commit a6f157a8 authored by Ian McDonald's avatar Ian McDonald Committed by David S. Miller

[NET]: fix __sk_stream_mem_reclaim

__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: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd1278d7
...@@ -196,15 +196,13 @@ EXPORT_SYMBOL(sk_stream_error); ...@@ -196,15 +196,13 @@ EXPORT_SYMBOL(sk_stream_error);
void __sk_stream_mem_reclaim(struct sock *sk) 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,
atomic_sub(sk->sk_forward_alloc / SK_STREAM_MEM_QUANTUM, sk->sk_prot->memory_allocated);
sk->sk_prot->memory_allocated); sk->sk_forward_alloc &= SK_STREAM_MEM_QUANTUM - 1;
sk->sk_forward_alloc &= SK_STREAM_MEM_QUANTUM - 1; if (*sk->sk_prot->memory_pressure &&
if (*sk->sk_prot->memory_pressure && (atomic_read(sk->sk_prot->memory_allocated) <
(atomic_read(sk->sk_prot->memory_allocated) < sk->sk_prot->sysctl_mem[0]))
sk->sk_prot->sysctl_mem[0])) *sk->sk_prot->memory_pressure = 0;
*sk->sk_prot->memory_pressure = 0;
}
} }
EXPORT_SYMBOL(__sk_stream_mem_reclaim); EXPORT_SYMBOL(__sk_stream_mem_reclaim);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment