Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32516
b: refs/heads/master
c: a6f157a
h: refs/heads/master
v: v3
  • Loading branch information
Ian McDonald authored and David S. Miller committed Jul 13, 2006
1 parent 2408e1e commit 3130d27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd1278d720b48ad7576f64014b916cc77365cb3f
refs/heads/master: a6f157a88d1398d7ccb743c5a56138edf6f6ef0b
16 changes: 7 additions & 9 deletions trunk/net/core/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3130d27

Please sign in to comment.