Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82666
b: refs/heads/master
c: 80ee5ad
h: refs/heads/master
v: v3
  • Loading branch information
Jay Vosburgh authored and David S. Miller committed Feb 3, 2008
1 parent a377d14 commit 1e026ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a42e534f1b6be7f2f68f83d29588c3f2736b4d25
refs/heads/master: 80ee5ad23150f1f3fe8d35728e860850ccea44da
14 changes: 11 additions & 3 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,10 +1464,12 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
dev_set_allmulti(slave_dev, 1);
}

netif_tx_lock_bh(bond_dev);
/* upload master's mc_list to new slave */
for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) {
dev_mc_add (slave_dev, dmi->dmi_addr, dmi->dmi_addrlen, 0);
}
netif_tx_unlock_bh(bond_dev);
}

if (bond->params.mode == BOND_MODE_8023AD) {
Expand Down Expand Up @@ -1821,7 +1823,9 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
}

/* flush master's mc_list from slave */
netif_tx_lock_bh(bond_dev);
bond_mc_list_flush(bond_dev, slave_dev);
netif_tx_unlock_bh(bond_dev);
}

netdev_set_master(slave_dev, NULL);
Expand Down Expand Up @@ -1942,7 +1946,9 @@ static int bond_release_all(struct net_device *bond_dev)
}

/* flush master's mc_list from slave */
netif_tx_lock_bh(bond_dev);
bond_mc_list_flush(bond_dev, slave_dev);
netif_tx_unlock_bh(bond_dev);
}

netdev_set_master(slave_dev, NULL);
Expand Down Expand Up @@ -3937,8 +3943,6 @@ static void bond_set_multicast_list(struct net_device *bond_dev)
struct bonding *bond = bond_dev->priv;
struct dev_mc_list *dmi;

write_lock_bh(&bond->lock);

/*
* Do promisc before checking multicast_mode
*/
Expand All @@ -3959,6 +3963,8 @@ static void bond_set_multicast_list(struct net_device *bond_dev)
bond_set_allmulti(bond, -1);
}

read_lock(&bond->lock);

bond->flags = bond_dev->flags;

/* looking for addresses to add to slaves' mc list */
Expand All @@ -3979,7 +3985,7 @@ static void bond_set_multicast_list(struct net_device *bond_dev)
bond_mc_list_destroy(bond);
bond_mc_list_copy(bond_dev->mc_list, bond, GFP_ATOMIC);

write_unlock_bh(&bond->lock);
read_unlock(&bond->lock);
}

/*
Expand Down Expand Up @@ -4526,7 +4532,9 @@ static void bond_free_all(void)
struct net_device *bond_dev = bond->dev;

bond_work_cancel_all(bond);
netif_tx_lock_bh(bond_dev);
bond_mc_list_destroy(bond);
netif_tx_unlock_bh(bond_dev);
/* Release the bonded slaves */
bond_release_all(bond_dev);
bond_deinit(bond_dev);
Expand Down

0 comments on commit 1e026ed

Please sign in to comment.