[BRIDGE]: Fix locking of set path cost.
authorStephen Hemminger <shemminger@linux-foundation.org>
Tue, 27 Feb 2007 17:55:07 +0000 (09:55 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 28 Feb 2007 17:42:12 +0000 (09:42 -0800)
This change goes with earlier change to get rid of
work queue for path cost. Now stp_set_path_cost does its own
locking. This is to allow it to call br_path_cost() which calls
ethtool interfaces (might sleep).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_ioctl.c

index 3ab153d..147015f 100644 (file)
@@ -291,12 +291,11 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                if (!capable(CAP_NET_ADMIN))
                        return -EPERM;
 
-               spin_lock_bh(&br->lock);
                if ((p = br_get_port(br, args[1])) == NULL)
                        ret = -EINVAL;
                else
                        br_stp_set_path_cost(p, args[2]);
-               spin_unlock_bh(&br->lock);
+
                return ret;
        }