aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 43fc3fa50d62..20de3fa7ae40 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -779,7 +779,7 @@ extern void FASTCALL(release_sock(struct sock *sk));
779 779
780extern struct sock *sk_alloc(struct net *net, int family, 780extern struct sock *sk_alloc(struct net *net, int family,
781 gfp_t priority, 781 gfp_t priority,
782 struct proto *prot, int zero_it); 782 struct proto *prot);
783extern void sk_free(struct sock *sk); 783extern void sk_free(struct sock *sk);
784extern struct sock *sk_clone(const struct sock *sk, 784extern struct sock *sk_clone(const struct sock *sk,
785 const gfp_t priority); 785 const gfp_t priority);
@@ -993,20 +993,6 @@ static inline void sock_graft(struct sock *sk, struct socket *parent)
993 write_unlock_bh(&sk->sk_callback_lock); 993 write_unlock_bh(&sk->sk_callback_lock);
994} 994}
995 995
996static inline void sock_copy(struct sock *nsk, const struct sock *osk)
997{
998#ifdef CONFIG_SECURITY_NETWORK
999 void *sptr = nsk->sk_security;
1000#endif
1001
1002 memcpy(nsk, osk, osk->sk_prot->obj_size);
1003 get_net(nsk->sk_net);
1004#ifdef CONFIG_SECURITY_NETWORK
1005 nsk->sk_security = sptr;
1006 security_sk_clone(osk, nsk);
1007#endif
1008}
1009
1010extern int sock_i_uid(struct sock *sk); 996extern int sock_i_uid(struct sock *sk);
1011extern unsigned long sock_i_ino(struct sock *sk); 997extern unsigned long sock_i_ino(struct sock *sk);
1012 998