diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-03-21 06:58:36 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 06:58:36 (GMT) |
commit | f8ae737deea1be001d7d8ac11c382a7b73a1c98f (patch) | |
tree | fdf933b58a17e525e38683e1f8d5a52c4708964b /net/bridge/br_fdb.c | |
parent | fdeabdefb227be9aa932f59a23ddb47e003e643e (diff) | |
download | linux-f8ae737deea1be001d7d8ac11c382a7b73a1c98f.tar.xz |
[BRIDGE]: forwarding remove unneeded preempt and bh diasables
Optimize the forwarding and transmit paths. Both places are
called with bottom half/no preempt so there is no need to use
spin_lock_bh or rcu_read_lock.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r-- | net/bridge/br_fdb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 1f08a59..3a73b8c 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -341,7 +341,6 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, if (hold_time(br) == 0) return; - rcu_read_lock(); fdb = fdb_find(head, addr); if (likely(fdb)) { /* attempt to update an entry for a local interface */ @@ -356,13 +355,12 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, fdb->ageing_timer = jiffies; } } else { - spin_lock_bh(&br->hash_lock); + spin_lock(&br->hash_lock); if (!fdb_find(head, addr)) fdb_create(head, source, addr, 0); /* else we lose race and someone else inserts * it first, don't bother updating */ - spin_unlock_bh(&br->hash_lock); + spin_unlock(&br->hash_lock); } - rcu_read_unlock(); } |