aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2012-01-09 00:33:16 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-09 02:44:26 -0500
commit475f1b52645a29936b9df1d8fcd45f7e56bd4a9f (patch)
treed0f9641f2f0ac6263b3c1ef4e8dfe8baf2602dd7
parentb189e810619a676e6b931a942a3e8387f3d39c21 (diff)
net: sk_update_clone is only used in net/core/sock.c
so move it there. Fixes build errors when CONFIG_INET is not defined: In file included from include/linux/tcp.h:211:0, from include/linux/ipv6.h:221, from include/net/ipv6.h:16, from include/linux/sunrpc/clnt.h:26, from include/linux/nfs_fs.h:50, from init/do_mounts.c:20: include/net/sock.h: In function 'sk_update_clone': include/net/sock.h:1109:3: error: implicit declaration of function 'sock_update_memcg' [-Werror=implicit-function-declaration] Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/sock.h6
-rw-r--r--net/core/sock.c6
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
1106static 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
1112static inline int 1106static inline int
1113proto_sockets_allocated_sum_positive(struct proto *prot) 1107proto_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}
1273EXPORT_SYMBOL(sk_release_kernel); 1273EXPORT_SYMBOL(sk_release_kernel);
1274 1274
1275static 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