aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2011-12-15 01:05:10 +0000
committerDavid S. Miller <[email protected]>2011-12-15 16:59:44 +0000
commitc48e074c7c75c0de4652ea5f5bf4e74c8cf4e3dd (patch)
tree420f3e91fc506f841e1caacc436a1780f8a4d1a9
parentMove limit definitions outside CONFIG_INET (diff)
downloadkernel-c48e074c7c75c0de4652ea5f5bf4e74c8cf4e3dd.tar.gz
kernel-c48e074c7c75c0de4652ea5f5bf4e74c8cf4e3dd.zip
tcp_memcontrol: fix reversed if condition
We should only dereference the pointer if it's valid, not the other way round. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--net/ipv4/tcp_memcontrol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_memcontrol.c b/net/ipv4/tcp_memcontrol.c
index 171d7b64f803..7fed04f875c1 100644
--- a/net/ipv4/tcp_memcontrol.c
+++ b/net/ipv4/tcp_memcontrol.c
@@ -44,7 +44,7 @@ static inline struct tcp_memcontrol *tcp_from_cgproto(struct cg_proto *cg_proto)
static void memcg_tcp_enter_memory_pressure(struct sock *sk)
{
- if (!sk->sk_cgrp->memory_pressure)
+ if (sk->sk_cgrp->memory_pressure)
*sk->sk_cgrp->memory_pressure = 1;
}
EXPORT_SYMBOL(memcg_tcp_enter_memory_pressure);