mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
[NET]: Move the sock_copy() from the header
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>
This commit is contained in:
parent
261ab365fa
commit
f1a6c4da14
2 changed files with 14 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue