]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/netdevice.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
[linux-2.6-omap-h63xx.git] / include / linux / netdevice.h
index c36c76caf20b88204a002b14cbe800571cbd4da5..7c1d4466583b74e05ea09a16f86ea96a98651e8f 100644 (file)
@@ -741,7 +741,6 @@ struct net_device
 #define        NETDEV_ALIGN            32
 #define        NETDEV_ALIGN_CONST      (NETDEV_ALIGN - 1)
 
-#ifdef CONFIG_NET
 /*
  * Net namespace inlines
  */
@@ -759,10 +758,10 @@ static inline
 void dev_net_set(struct net_device *dev, struct net *net)
 {
 #ifdef CONFIG_NET_NS
-       dev->nd_net = net;
+       release_net(dev->nd_net);
+       dev->nd_net = hold_net(net);
 #endif
 }
-#endif
 
 /**
  *     netdev_priv - access network device private data
@@ -827,7 +826,6 @@ struct packet_type {
 extern rwlock_t                                dev_base_lock;          /* Device list lock */
 
 
-#ifdef CONFIG_NET
 #define for_each_netdev(net, d)                \
                list_for_each_entry(d, &(net)->dev_base_head, dev_list)
 #define for_each_netdev_safe(net, d, n)        \
@@ -851,7 +849,6 @@ static inline struct net_device *first_net_device(struct net *net)
        return list_empty(&net->dev_base_head) ? NULL :
                net_device_entry(net->dev_base_head.next);
 }
-#endif
 
 extern int                     netdev_boot_setup_check(struct net_device *dev);
 extern unsigned long           netdev_boot_base(const char *prefix, int unit);