bridge: update sysfs link names if port device names have changed
[safe/jmp/linux-2.6] / net / 8021q / vlanproc.c
index b55a091..afead35 100644 (file)
@@ -107,7 +107,7 @@ static const struct file_operations vlandev_fops = {
  */
 
 /* Strings */
-static const char *vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = {
+static const char *const vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = {
     [VLAN_NAME_TYPE_RAW_PLUS_VID]        = "VLAN_NAME_TYPE_RAW_PLUS_VID",
     [VLAN_NAME_TYPE_PLUS_VID_NO_PAD]    = "VLAN_NAME_TYPE_PLUS_VID_NO_PAD",
     [VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD",
@@ -140,7 +140,7 @@ void vlan_proc_cleanup(struct net *net)
  *     Create /proc/net/vlan entries
  */
 
-int vlan_proc_init(struct net *net)
+int __net_init vlan_proc_init(struct net *net)
 {
        struct vlan_net *vn = net_generic(net, vlan_net_id);
 
@@ -201,18 +201,17 @@ int vlan_proc_rem_dev(struct net_device *vlandev)
 
 /* start read of /proc/net/vlan/config */
 static void *vlan_seq_start(struct seq_file *seq, loff_t *pos)
-       __acquires(dev_base_lock)
+       __acquires(rcu)
 {
        struct net_device *dev;
        struct net *net = seq_file_net(seq);
        loff_t i = 1;
 
-       read_lock(&dev_base_lock);
-
+       rcu_read_lock();
        if (*pos == 0)
                return SEQ_START_TOKEN;
 
-       for_each_netdev(net, dev) {
+       for_each_netdev_rcu(net, dev) {
                if (!is_vlan_dev(dev))
                        continue;
 
@@ -234,7 +233,7 @@ static void *vlan_seq_next(struct seq_file *seq, void *v, loff_t *pos)
        if (v == SEQ_START_TOKEN)
                dev = net_device_entry(&net->dev_base_head);
 
-       for_each_netdev_continue(net, dev) {
+       for_each_netdev_continue_rcu(net, dev) {
                if (!is_vlan_dev(dev))
                        continue;
 
@@ -245,9 +244,9 @@ static void *vlan_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 }
 
 static void vlan_seq_stop(struct seq_file *seq, void *v)
-       __releases(dev_base_lock)
+       __releases(rcu)
 {
-       read_unlock(&dev_base_lock);
+       rcu_read_unlock();
 }
 
 static int vlan_seq_show(struct seq_file *seq, void *v)