Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c48e074c authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

tcp_memcontrol: fix reversed if condition



We should only dereference the pointer if it's valid, not the other way
round.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 888bdaa9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);