mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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 <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
888bdaa9b2
commit
c48e074c7c
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue