diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-05-08 21:12:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-11 10:50:18 -0400 |
commit | affb9792f1d99e1e4d64411e147b648d65f2576e (patch) | |
tree | 0f787a635911a4c854638de7ff36cb93a32ca5aa /include/net/sock.h | |
parent | 13d3078e22f5651cd0184ce1b4e4ab8a46c62b27 (diff) | |
download | op-kernel-dev-affb9792f1d99e1e4d64411e147b648d65f2576e.zip op-kernel-dev-affb9792f1d99e1e4d64411e147b648d65f2576e.tar.gz |
net: kill sk_change_net and sk_release_kernel
These functions are no longer needed and no longer used kill them.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 9e6b2c0..d882f4c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1518,7 +1518,6 @@ static inline void unlock_sock_fast(struct sock *sk, bool slow) struct sock *sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot, int kern); void sk_free(struct sock *sk); -void sk_release_kernel(struct sock *sk); struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority); struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, @@ -2194,22 +2193,6 @@ void sock_net_set(struct sock *sk, struct net *net) write_pnet(&sk->sk_net, net); } -/* - * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace. - * They should not hold a reference to a namespace in order to allow - * to stop it. - * Sockets after sk_change_net should be released using sk_release_kernel - */ -static inline void sk_change_net(struct sock *sk, struct net *net) -{ - struct net *current_net = sock_net(sk); - - if (!net_eq(current_net, net)) { - put_net(current_net); - sock_net_set(sk, net); - } -} - static inline struct sock *skb_steal_sock(struct sk_buff *skb) { if (skb->sk) { |