[BRIDGE]: remove unneeded bh disables

The STP timers run off softirq (kernel timers), so there is no need to
disable bottom half in the spin locks.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Stephen Hemminger 2006-03-20 22:56:25 -08:00 committed by David S. Miller
parent 9ebddc1aa3
commit e3efe08e9a

View File

@ -39,13 +39,13 @@ static void br_hello_timer_expired(unsigned long arg)
struct net_bridge *br = (struct net_bridge *)arg; struct net_bridge *br = (struct net_bridge *)arg;
pr_debug("%s: hello timer expired\n", br->dev->name); pr_debug("%s: hello timer expired\n", br->dev->name);
spin_lock_bh(&br->lock); spin_lock(&br->lock);
if (br->dev->flags & IFF_UP) { if (br->dev->flags & IFF_UP) {
br_config_bpdu_generation(br); br_config_bpdu_generation(br);
mod_timer(&br->hello_timer, jiffies + br->hello_time); mod_timer(&br->hello_timer, jiffies + br->hello_time);
} }
spin_unlock_bh(&br->lock); spin_unlock(&br->lock);
} }
static void br_message_age_timer_expired(unsigned long arg) static void br_message_age_timer_expired(unsigned long arg)
@ -71,7 +71,7 @@ static void br_message_age_timer_expired(unsigned long arg)
* running when we are the root bridge. So.. this was_root * running when we are the root bridge. So.. this was_root
* check is redundant. I'm leaving it in for now, though. * check is redundant. I'm leaving it in for now, though.
*/ */
spin_lock_bh(&br->lock); spin_lock(&br->lock);
if (p->state == BR_STATE_DISABLED) if (p->state == BR_STATE_DISABLED)
goto unlock; goto unlock;
was_root = br_is_root_bridge(br); was_root = br_is_root_bridge(br);
@ -82,7 +82,7 @@ static void br_message_age_timer_expired(unsigned long arg)
if (br_is_root_bridge(br) && !was_root) if (br_is_root_bridge(br) && !was_root)
br_become_root_bridge(br); br_become_root_bridge(br);
unlock: unlock:
spin_unlock_bh(&br->lock); spin_unlock(&br->lock);
} }
static void br_forward_delay_timer_expired(unsigned long arg) static void br_forward_delay_timer_expired(unsigned long arg)
@ -92,7 +92,7 @@ static void br_forward_delay_timer_expired(unsigned long arg)
pr_debug("%s: %d(%s) forward delay timer\n", pr_debug("%s: %d(%s) forward delay timer\n",
br->dev->name, p->port_no, p->dev->name); br->dev->name, p->port_no, p->dev->name);
spin_lock_bh(&br->lock); spin_lock(&br->lock);
if (p->state == BR_STATE_LISTENING) { if (p->state == BR_STATE_LISTENING) {
p->state = BR_STATE_LEARNING; p->state = BR_STATE_LEARNING;
mod_timer(&p->forward_delay_timer, mod_timer(&p->forward_delay_timer,
@ -103,7 +103,7 @@ static void br_forward_delay_timer_expired(unsigned long arg)
br_topology_change_detection(br); br_topology_change_detection(br);
} }
br_log_state(p); br_log_state(p);
spin_unlock_bh(&br->lock); spin_unlock(&br->lock);
} }
static void br_tcn_timer_expired(unsigned long arg) static void br_tcn_timer_expired(unsigned long arg)
@ -111,13 +111,13 @@ static void br_tcn_timer_expired(unsigned long arg)
struct net_bridge *br = (struct net_bridge *) arg; struct net_bridge *br = (struct net_bridge *) arg;
pr_debug("%s: tcn timer expired\n", br->dev->name); pr_debug("%s: tcn timer expired\n", br->dev->name);
spin_lock_bh(&br->lock); spin_lock(&br->lock);
if (br->dev->flags & IFF_UP) { if (br->dev->flags & IFF_UP) {
br_transmit_tcn(br); br_transmit_tcn(br);
mod_timer(&br->tcn_timer,jiffies + br->bridge_hello_time); mod_timer(&br->tcn_timer,jiffies + br->bridge_hello_time);
} }
spin_unlock_bh(&br->lock); spin_unlock(&br->lock);
} }
static void br_topology_change_timer_expired(unsigned long arg) static void br_topology_change_timer_expired(unsigned long arg)
@ -125,10 +125,10 @@ static void br_topology_change_timer_expired(unsigned long arg)
struct net_bridge *br = (struct net_bridge *) arg; struct net_bridge *br = (struct net_bridge *) arg;
pr_debug("%s: topo change timer expired\n", br->dev->name); pr_debug("%s: topo change timer expired\n", br->dev->name);
spin_lock_bh(&br->lock); spin_lock(&br->lock);
br->topology_change_detected = 0; br->topology_change_detected = 0;
br->topology_change = 0; br->topology_change = 0;
spin_unlock_bh(&br->lock); spin_unlock(&br->lock);
} }
static void br_hold_timer_expired(unsigned long arg) static void br_hold_timer_expired(unsigned long arg)
@ -138,10 +138,10 @@ static void br_hold_timer_expired(unsigned long arg)
pr_debug("%s: %d(%s) hold timer expired\n", pr_debug("%s: %d(%s) hold timer expired\n",
p->br->dev->name, p->port_no, p->dev->name); p->br->dev->name, p->port_no, p->dev->name);
spin_lock_bh(&p->br->lock); spin_lock(&p->br->lock);
if (p->config_pending) if (p->config_pending)
br_transmit_config(p); br_transmit_config(p);
spin_unlock_bh(&p->br->lock); spin_unlock(&p->br->lock);
} }
static inline void br_timer_init(struct timer_list *timer, static inline void br_timer_init(struct timer_list *timer,