From 475f1b52645a29936b9df1d8fcd45f7e56bd4a9f Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Mon, 9 Jan 2012 16:33:16 +1100 Subject: 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 Signed-off-by: David S. Miller --- net/core/sock.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net') diff --git a/net/core/sock.c b/net/core/sock.c index e80b64f..c3ae73d 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1272,6 +1272,12 @@ void sk_release_kernel(struct sock *sk) } EXPORT_SYMBOL(sk_release_kernel); +static void sk_update_clone(const struct sock *sk, struct sock *newsk) +{ + if (mem_cgroup_sockets_enabled && sk->sk_cgrp) + sock_update_memcg(newsk); +} + /** * sk_clone_lock - clone a socket, and lock its clone * @sk: the socket to clone -- cgit v1.1