diff options
-rw-r--r-- | include/net/sock.h | 6 | ||||
-rw-r--r-- | net/core/sock.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 0ed65e3a0bea..bb972d254dff 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1103,12 +1103,6 @@ sk_sockets_allocated_read_positive(struct sock *sk) | |||
1103 | return percpu_counter_sum_positive(prot->sockets_allocated); | 1103 | return percpu_counter_sum_positive(prot->sockets_allocated); |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | static inline void sk_update_clone(const struct sock *sk, struct sock *newsk) | ||
1107 | { | ||
1108 | if (mem_cgroup_sockets_enabled && sk->sk_cgrp) | ||
1109 | sock_update_memcg(newsk); | ||
1110 | } | ||
1111 | |||
1112 | static inline int | 1106 | static inline int |
1113 | proto_sockets_allocated_sum_positive(struct proto *prot) | 1107 | proto_sockets_allocated_sum_positive(struct proto *prot) |
1114 | { | 1108 | { |
diff --git a/net/core/sock.c b/net/core/sock.c index e80b64fbd663..c3ae73de0239 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1272,6 +1272,12 @@ void sk_release_kernel(struct sock *sk) | |||
1272 | } | 1272 | } |
1273 | EXPORT_SYMBOL(sk_release_kernel); | 1273 | EXPORT_SYMBOL(sk_release_kernel); |
1274 | 1274 | ||
1275 | static void sk_update_clone(const struct sock *sk, struct sock *newsk) | ||
1276 | { | ||
1277 | if (mem_cgroup_sockets_enabled && sk->sk_cgrp) | ||
1278 | sock_update_memcg(newsk); | ||
1279 | } | ||
1280 | |||
1275 | /** | 1281 | /** |
1276 | * sk_clone_lock - clone a socket, and lock its clone | 1282 | * sk_clone_lock - clone a socket, and lock its clone |
1277 | * @sk: the socket to clone | 1283 | * @sk: the socket to clone |