aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-03-12 00:04:08 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-12 14:39:40 -0400
commitefd7ef1c1929d7a0329d4349252863c04d6f1729 (patch)
tree66a1d5ba57a27fda7665da756551c10ac0ebf656 /include/net/net_namespace.h
parent6c7005f6cb1bf63bb1f505ef69364fb2cc00628e (diff)
net: Kill hold_net release_net
hold_net and release_net were an idea that turned out to be useless. The code has been disabled since 2008. Kill the code it is long past due. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index e086f4030dd2..fab51ceeabf3 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -49,11 +49,6 @@ struct net {
49 atomic_t count; /* To decided when the network 49 atomic_t count; /* To decided when the network
50 * namespace should be shut down. 50 * namespace should be shut down.
51 */ 51 */
52#ifdef NETNS_REFCNT_DEBUG
53 atomic_t use_count; /* To track references we
54 * destroy on demand
55 */
56#endif
57 spinlock_t rules_mod_lock; 52 spinlock_t rules_mod_lock;
58 53
59 atomic64_t cookie_gen; 54 atomic64_t cookie_gen;
@@ -236,30 +231,6 @@ int net_eq(const struct net *net1, const struct net *net2)
236#endif 231#endif
237 232
238 233
239#ifdef NETNS_REFCNT_DEBUG
240static inline struct net *hold_net(struct net *net)
241{
242 if (net)
243 atomic_inc(&net->use_count);
244 return net;
245}
246
247static inline void release_net(struct net *net)
248{
249 if (net)
250 atomic_dec(&net->use_count);
251}
252#else
253static inline struct net *hold_net(struct net *net)
254{
255 return net;
256}
257
258static inline void release_net(struct net *net)
259{
260}
261#endif
262
263#ifdef CONFIG_NET_NS 234#ifdef CONFIG_NET_NS
264 235
265static inline void write_pnet(struct net **pnet, struct net *net) 236static inline void write_pnet(struct net **pnet, struct net *net)