Commit a4aa834a authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller

[NETNS]: Declare init_net even without CONFIG_NET defined.

This does not look good, but there is no other choice. The compilation
without CONFIG_NET is broken and can not be fixed with ease.

After that there is no need for the following commits:
1567ca7e
3edf8fa5
2d38f9a4

Revert them.
Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e1ec1b8c
...@@ -741,7 +741,6 @@ struct net_device ...@@ -741,7 +741,6 @@ struct net_device
#define NETDEV_ALIGN 32 #define NETDEV_ALIGN 32
#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1)
#ifdef CONFIG_NET
/* /*
* Net namespace inlines * Net namespace inlines
*/ */
...@@ -762,7 +761,6 @@ void dev_net_set(struct net_device *dev, struct net *net) ...@@ -762,7 +761,6 @@ void dev_net_set(struct net_device *dev, struct net *net)
dev->nd_net = net; dev->nd_net = net;
#endif #endif
} }
#endif
/** /**
* netdev_priv - access network device private data * netdev_priv - access network device private data
...@@ -827,7 +825,6 @@ struct packet_type { ...@@ -827,7 +825,6 @@ struct packet_type {
extern rwlock_t dev_base_lock; /* Device list lock */ extern rwlock_t dev_base_lock; /* Device list lock */
#ifdef CONFIG_NET
#define for_each_netdev(net, d) \ #define for_each_netdev(net, d) \
list_for_each_entry(d, &(net)->dev_base_head, dev_list) list_for_each_entry(d, &(net)->dev_base_head, dev_list)
#define for_each_netdev_safe(net, d, n) \ #define for_each_netdev_safe(net, d, n) \
...@@ -851,7 +848,6 @@ static inline struct net_device *first_net_device(struct net *net) ...@@ -851,7 +848,6 @@ static inline struct net_device *first_net_device(struct net *net)
return list_empty(&net->dev_base_head) ? NULL : return list_empty(&net->dev_base_head) ? NULL :
net_device_entry(net->dev_base_head.next); net_device_entry(net->dev_base_head.next);
} }
#endif
extern int netdev_boot_setup_check(struct net_device *dev); extern int netdev_boot_setup_check(struct net_device *dev);
extern unsigned long netdev_boot_base(const char *prefix, int unit); extern unsigned long netdev_boot_base(const char *prefix, int unit);
......
...@@ -60,11 +60,12 @@ struct net { ...@@ -60,11 +60,12 @@ struct net {
}; };
#ifdef CONFIG_NET
#include <linux/seq_file_net.h> #include <linux/seq_file_net.h>
/* Init's network namespace */ /* Init's network namespace */
extern struct net init_net; extern struct net init_net;
#ifdef CONFIG_NET
#define INIT_NET_NS(net_ns) .net_ns = &init_net, #define INIT_NET_NS(net_ns) .net_ns = &init_net,
extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns);
......
...@@ -19,12 +19,10 @@ ...@@ -19,12 +19,10 @@
#include <linux/kobject.h> #include <linux/kobject.h>
#include <linux/module.h> #include <linux/module.h>
#ifdef CONFIG_NET
#include <linux/socket.h> #include <linux/socket.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/netlink.h> #include <linux/netlink.h>
#include <net/sock.h> #include <net/sock.h>
#endif
u64 uevent_seqnum; u64 uevent_seqnum;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment