summaryrefslogtreecommitdiff
path: root/include/net/proto_memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/proto_memory.h')
-rw-r--r--include/net/proto_memory.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/proto_memory.h b/include/net/proto_memory.h
index 8e91a8fa31b5..ad6d703ce6fe 100644
--- a/include/net/proto_memory.h
+++ b/include/net/proto_memory.h
@@ -35,6 +35,9 @@ static inline bool sk_under_memory_pressure(const struct sock *sk)
mem_cgroup_sk_under_memory_pressure(sk))
return true;
+ if (sk->sk_bypass_prot_mem)
+ return false;
+
return !!READ_ONCE(*sk->sk_prot->memory_pressure);
}