[NET]: Make the device list and device lookups per namespace.
[pandora-kernel.git] / arch / s390 / appldata / appldata_net_sum.c
index 075e619..6c1815a 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/kernel_stat.h>
 #include <linux/netdevice.h>
+#include <net/net_namespace.h>
 
 #include "appldata.h"
 
@@ -34,7 +35,7 @@
  * book:
  * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml
  */
-struct appldata_net_sum_data {
+static struct appldata_net_sum_data {
        u64 timestamp;
        u32 sync_count_1;       /* after VM collected the record data, */
        u32 sync_count_2;       /* sync_count_1 and sync_count_2 should be the
@@ -107,10 +108,7 @@ static void appldata_get_net_sum_data(void *data)
        tx_dropped = 0;
        collisions = 0;
        read_lock(&dev_base_lock);
-       for (dev = dev_base; dev != NULL; dev = dev->next) {
-               if (dev->get_stats == NULL) {
-                       continue;
-               }
+       for_each_netdev(&init_net, dev) {
                stats = dev->get_stats(dev);
                rx_packets += stats->rx_packets;
                tx_packets += stats->tx_packets;