[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1430988770-28907-11-git-send-email-ying.xue@windriver.com>
Date: Thu, 7 May 2015 16:52:49 +0800
From: Ying Xue <ying.xue@...driver.com>
To: <netdev@...r.kernel.org>
CC: <cwang@...pensource.com>, <herbert@...dor.apana.org.au>,
<xemul@...nvz.org>, <davem@...emloft.net>,
<eric.dumazet@...il.com>, <ebiederm@...ssion.com>,
<maxk@....qualcomm.com>, <stephen@...workplumber.org>,
<tgraf@...g.ch>, <nicolas.dichtel@...nd.com>,
<tom@...bertland.com>, <jchapman@...alix.com>,
<erik.hugne@...csson.com>, <jon.maloy@...csson.com>,
<horms@...ge.net.au>
Subject: [RFC PATCH net-next 10/11] tipc: remove sk_change_net interface
Until now all callers of sk_change_net() don't rely on it to create
kernel sockets, so now it's an appropriate time to purge it completely.
Signed-off-by: Ying Xue <ying.xue@...driver.com>
---
include/net/sock.h | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index 3a4898e..586e352 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2192,22 +2192,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) {
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists