]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: sk_update_clone is only used in net/core/sock.c
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 9 Jan 2012 05:33:16 +0000 (16:33 +1100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jan 2012 07:44:26 +0000 (23:44 -0800)
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>
include/net/sock.h
net/core/sock.c

index 0ed65e3a0bea8b9f3ef747b793d532d2b407f301..bb972d254dff4550301b189bb487e554da02ae58 100644 (file)
@@ -1103,12 +1103,6 @@ sk_sockets_allocated_read_positive(struct sock *sk)
        return percpu_counter_sum_positive(prot->sockets_allocated);
 }
 
        return percpu_counter_sum_positive(prot->sockets_allocated);
 }
 
-static inline void sk_update_clone(const struct sock *sk, struct sock *newsk)
-{
-       if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
-               sock_update_memcg(newsk);
-}
-
 static inline int
 proto_sockets_allocated_sum_positive(struct proto *prot)
 {
 static inline int
 proto_sockets_allocated_sum_positive(struct proto *prot)
 {
index e80b64fbd663e702612a809dfba49527345b627b..c3ae73de023993c2a2ce94b1d8bbde1af99617ba 100644 (file)
@@ -1272,6 +1272,12 @@ void sk_release_kernel(struct sock *sk)
 }
 EXPORT_SYMBOL(sk_release_kernel);
 
 }
 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
 /**
  *     sk_clone_lock - clone a socket, and lock its clone
  *     @sk: the socket to clone