summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorIan McDonald <ian.mcdonald@jandi.co.nz>2006-07-12 17:58:53 -0700
committerDavid S. Miller <davem@davemloft.net>2006-07-12 17:58:53 -0700
commita6f157a88d1398d7ccb743c5a56138edf6f6ef0b (patch)
tree8244a8f1e359830829b0845cc677edd2d3959a47 /net/core
parentfd1278d720b48ad7576f64014b916cc77365cb3f (diff)
downloadop-kernel-dev-a6f157a88d1398d7ccb743c5a56138edf6f6ef0b.zip
op-kernel-dev-a6f157a88d1398d7ccb743c5a56138edf6f6ef0b.tar.gz
[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: 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>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/stream.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/net/core/stream.c b/net/core/stream.c
index e948969..d1d7dec 100644
--- a/net/core/stream.c
+++ b/net/core/stream.c
@@ -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);
OpenPOWER on IntegriCloud