]> err.no Git - linux-2.6/blobdiff - include/linux/netdevice.h
Merge branch 'upstream-jeff' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu...
[linux-2.6] / include / linux / netdevice.h
index d146be40f46c50df1a63cc3619af248ced86a3b9..7c1d4466583b74e05ea09a16f86ea96a98651e8f 100644 (file)
@@ -383,9 +383,11 @@ static inline void __napi_complete(struct napi_struct *n)
 
 static inline void napi_complete(struct napi_struct *n)
 {
-       local_irq_disable();
+       unsigned long flags;
+
+       local_irq_save(flags);
        __napi_complete(n);
-       local_irq_enable();
+       local_irq_restore(flags);
 }
 
 /**
@@ -753,10 +755,11 @@ struct net *dev_net(const struct net_device *dev)
 }
 
 static inline
-void dev_net_set(struct net_device *dev, const struct net *net)
+void dev_net_set(struct net_device *dev, struct net *net)
 {
 #ifdef CONFIG_NET_NS
-       dev->nd_dev = net;
+       release_net(dev->nd_net);
+       dev->nd_net = hold_net(net);
 #endif
 }
 
@@ -1099,12 +1102,14 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
 }
 
 /* Use this variant when it is known for sure that it
- * is executing from interrupt context.
+ * is executing from hardware interrupt context or with hardware interrupts
+ * disabled.
  */
 extern void dev_kfree_skb_irq(struct sk_buff *skb);
 
 /* Use this variant in places where it could be invoked
- * either from interrupt or non-interrupt context.
+ * from either hardware interrupt or other context, with hardware interrupts
+ * either disabled or enabled.
  */
 extern void dev_kfree_skb_any(struct sk_buff *skb);