aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-02 03:09:29 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-02 03:09:29 -0400
commit225c0a0107735597100dc4133cd88c5ed10d9e63 (patch)
treec82526bf42ccc2e29761cce80f3f60a1ce491855
parentf0bdb7ba5af5a7028479e9067ee74e9d66eea6df (diff)
[NETNS]: Merge ifdef CONFIG_NET in include/net/net_namespace.h.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/net_namespace.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index c01d45fe08c3..4a37037b1d17 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -59,25 +59,27 @@ struct net {
59#endif 59#endif
60}; 60};
61 61
62
62#ifdef CONFIG_NET 63#ifdef CONFIG_NET
63/* Init's network namespace */ 64/* Init's network namespace */
64extern struct net init_net; 65extern struct net init_net;
65#define INIT_NET_NS(net_ns) .net_ns = &init_net, 66#define INIT_NET_NS(net_ns) .net_ns = &init_net,
66#else
67#define INIT_NET_NS(net_ns)
68#endif
69 67
70extern struct list_head net_namespace_list;
71
72#ifdef CONFIG_NET
73extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); 68extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns);
74#else 69
70#else /* CONFIG_NET */
71
72#define INIT_NET_NS(net_ns)
73
75static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) 74static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns)
76{ 75{
77 /* There is nothing to copy so this is a noop */ 76 /* There is nothing to copy so this is a noop */
78 return net_ns; 77 return net_ns;
79} 78}
80#endif 79#endif /* CONFIG_NET */
80
81
82extern struct list_head net_namespace_list;
81 83
82#ifdef CONFIG_NET_NS 84#ifdef CONFIG_NET_NS
83extern void __put_net(struct net *net); 85extern void __put_net(struct net *net);