aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/init_task.h2
-rw-r--r--include/net/net_namespace.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index e2c1ffcff62c..513bc3e489f0 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -79,7 +79,7 @@ extern struct nsproxy init_nsproxy;
79 .nslock = __SPIN_LOCK_UNLOCKED(nsproxy.nslock), \ 79 .nslock = __SPIN_LOCK_UNLOCKED(nsproxy.nslock), \
80 .uts_ns = &init_uts_ns, \ 80 .uts_ns = &init_uts_ns, \
81 .mnt_ns = NULL, \ 81 .mnt_ns = NULL, \
82 .net_ns = &init_net, \ 82 INIT_NET_NS(net_ns) \
83 INIT_IPC_NS(ipc_ns) \ 83 INIT_IPC_NS(ipc_ns) \
84 .user_ns = &init_user_ns, \ 84 .user_ns = &init_user_ns, \
85} 85}
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index fac42db7f6d0..3081b6ed35fe 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -28,7 +28,14 @@ struct net {
28 struct hlist_head *dev_index_head; 28 struct hlist_head *dev_index_head;
29}; 29};
30 30
31#ifdef CONFIG_NET
32/* Init's network namespace */
31extern struct net init_net; 33extern struct net init_net;
34#define INIT_NET_NS(net_ns) .net_ns = &init_net,
35#else
36#define INIT_NET_NS(net_ns)
37#endif
38
32extern struct list_head net_namespace_list; 39extern struct list_head net_namespace_list;
33 40
34extern void __put_net(struct net *net); 41extern void __put_net(struct net *net);