aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index e3a18ff0c38b..2ef3c3eca47a 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1035,7 +1035,6 @@ enum cg_proto_flags {
1035}; 1035};
1036 1036
1037struct cg_proto { 1037struct cg_proto {
1038 void (*enter_memory_pressure)(struct sock *sk);
1039 struct res_counter memory_allocated; /* Current allocated memory. */ 1038 struct res_counter memory_allocated; /* Current allocated memory. */
1040 struct percpu_counter sockets_allocated; /* Current number of sockets. */ 1039 struct percpu_counter sockets_allocated; /* Current number of sockets. */
1041 int memory_pressure; 1040 int memory_pressure;
@@ -1155,8 +1154,7 @@ static inline void sk_leave_memory_pressure(struct sock *sk)
1155 struct proto *prot = sk->sk_prot; 1154 struct proto *prot = sk->sk_prot;
1156 1155
1157 for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) 1156 for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto))
1158 if (cg_proto->memory_pressure) 1157 cg_proto->memory_pressure = 0;
1159 cg_proto->memory_pressure = 0;
1160 } 1158 }
1161 1159
1162} 1160}
@@ -1171,7 +1169,7 @@ static inline void sk_enter_memory_pressure(struct sock *sk)
1171 struct proto *prot = sk->sk_prot; 1169 struct proto *prot = sk->sk_prot;
1172 1170
1173 for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) 1171 for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto))
1174 cg_proto->enter_memory_pressure(sk); 1172 cg_proto->memory_pressure = 1;
1175 } 1173 }
1176 1174
1177 sk->sk_prot->enter_memory_pressure(sk); 1175 sk->sk_prot->enter_memory_pressure(sk);