net/mlx4_core: Demote simple multicast and broadcast flow steering rules
[deliverable/linux.git] / drivers / net / vxlan.c
index 5eddbc02c6c22cf0958ad00fb594f2c2c93cc333..34c519eb1db5092a6e1bd17e02b9a3e53a5c5cb2 100644 (file)
@@ -2131,9 +2131,10 @@ static void vxlan_cleanup(unsigned long arg)
        if (!netif_running(vxlan->dev))
                return;
 
-       spin_lock_bh(&vxlan->hash_lock);
        for (h = 0; h < FDB_HASH_SIZE; ++h) {
                struct hlist_node *p, *n;
+
+               spin_lock_bh(&vxlan->hash_lock);
                hlist_for_each_safe(p, n, &vxlan->fdb_head[h]) {
                        struct vxlan_fdb *f
                                = container_of(p, struct vxlan_fdb, hlist);
@@ -2152,8 +2153,8 @@ static void vxlan_cleanup(unsigned long arg)
                        } else if (time_before(timeout, next_timer))
                                next_timer = timeout;
                }
+               spin_unlock_bh(&vxlan->hash_lock);
        }
-       spin_unlock_bh(&vxlan->hash_lock);
 
        mod_timer(&vxlan->age_timer, next_timer);
 }
This page took 0.025218 seconds and 5 git commands to generate.