]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bridge/br_netlink.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[linux-2.6-omap-h63xx.git] / net / bridge / br_netlink.c
index a14ac51753e656343d75a6495e2c9167542e0a1d..0fcf6f073064feb4c2d29753246fe93186782637 100644 (file)
@@ -109,8 +109,8 @@ static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
        struct net_device *dev;
        int idx;
 
-       read_lock(&dev_base_lock);
-       for (dev = dev_base, idx = 0; dev; dev = dev->next) {
+       idx = 0;
+       for_each_netdev(dev) {
                /* not a bridge port */
                if (dev->br_port == NULL || idx < cb->args[0])
                        goto skip;
@@ -122,7 +122,6 @@ static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
 skip:
                ++idx;
        }
-       read_unlock(&dev_base_lock);
 
        cb->args[0] = idx;
 
@@ -165,7 +164,7 @@ static int br_rtm_setlink(struct sk_buff *skb,  struct nlmsghdr *nlh, void *arg)
                return -EINVAL;
 
        /* if kernel STP is running, don't allow changes */
-       if (p->br->stp_enabled)
+       if (p->br->stp_enabled == BR_KERNEL_STP)
                return -EBUSY;
 
        if (!netif_running(dev) ||