]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[NET]: Move the sock_copy() from the header
authorPavel Emelyanov <xemul@openvz.org>
Thu, 1 Nov 2007 07:29:45 +0000 (00:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Nov 2007 07:29:45 +0000 (00:29 -0700)
The sock_copy() call is not used outside the sock.c file,
so just move it into a sock.c

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/core/sock.c

index 43fc3fa50d6237227e5bec82bc0b4e8e0d4ce8b7..ecad7b4e2a6313f07a329316d249fcbf62e0bdfc 100644 (file)
@@ -993,20 +993,6 @@ static inline void sock_graft(struct sock *sk, struct socket *parent)
        write_unlock_bh(&sk->sk_callback_lock);
 }
 
-static inline void sock_copy(struct sock *nsk, const struct sock *osk)
-{
-#ifdef CONFIG_SECURITY_NETWORK
-       void *sptr = nsk->sk_security;
-#endif
-
-       memcpy(nsk, osk, osk->sk_prot->obj_size);
-       get_net(nsk->sk_net);
-#ifdef CONFIG_SECURITY_NETWORK
-       nsk->sk_security = sptr;
-       security_sk_clone(osk, nsk);
-#endif
-}
-
 extern int sock_i_uid(struct sock *sk);
 extern unsigned long sock_i_ino(struct sock *sk);
 
index bba9949681ff7e132f84629602814dc7d9aa17d4..fdacf9c8f1cb60149c4c1b347f1febb89fa3c743 100644 (file)
@@ -857,6 +857,20 @@ static inline void sock_lock_init(struct sock *sk)
                        af_family_keys + sk->sk_family);
 }
 
+static void sock_copy(struct sock *nsk, const struct sock *osk)
+{
+#ifdef CONFIG_SECURITY_NETWORK
+       void *sptr = nsk->sk_security;
+#endif
+
+       memcpy(nsk, osk, osk->sk_prot->obj_size);
+       get_net(nsk->sk_net);
+#ifdef CONFIG_SECURITY_NETWORK
+       nsk->sk_security = sptr;
+       security_sk_clone(osk, nsk);
+#endif
+}
+
 /**
  *     sk_alloc - All socket objects are allocated here
  *     @net: the applicable net namespace