Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251661
b: refs/heads/master
c: 9fe0617
h: refs/heads/master
i:
  251659: e1891d8
v: v3
  • Loading branch information
Neil Horman authored and David S. Miller committed May 25, 2011
1 parent 4989975 commit 9cc6d17
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 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: 2907c35ff64708065e5a7fd54e8ded8263eb3074
refs/heads/master: 9fe0617d9b6d21f700ee9e658e1c9fe3be2fb402
4 changes: 0 additions & 4 deletions trunk/drivers/net/bonding/bond_alb.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ static int tlb_initialize(struct bonding *bond)
struct tlb_client_info *new_hashtbl;
int i;

spin_lock_init(&(bond_info->tx_hashtbl_lock));

new_hashtbl = kzalloc(size, GFP_KERNEL);
if (!new_hashtbl) {
pr_err("%s: Error: Failed to allocate TLB hash table\n",
Expand Down Expand Up @@ -747,8 +745,6 @@ static int rlb_initialize(struct bonding *bond)
int size = RLB_HASH_TABLE_SIZE * sizeof(struct rlb_client_info);
int i;

spin_lock_init(&(bond_info->rx_hashtbl_lock));

new_hashtbl = kmalloc(size, GFP_KERNEL);
if (!new_hashtbl) {
pr_err("%s: Error: Failed to allocate RLB hash table\n",
Expand Down
16 changes: 10 additions & 6 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,12 +1542,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
bond_dev->name, slave_dev->name);
}

/* bond must be initialized by bond_open() before enslaving */
if (!(bond_dev->flags & IFF_UP)) {
pr_warning("%s: master_dev is not up in bond_enslave\n",
bond_dev->name);
}

/* already enslaved */
if (slave_dev->flags & IFF_SLAVE) {
pr_debug("Error, Device was already enslaved\n");
Expand Down Expand Up @@ -4834,9 +4828,19 @@ static int bond_init(struct net_device *bond_dev)
{
struct bonding *bond = netdev_priv(bond_dev);
struct bond_net *bn = net_generic(dev_net(bond_dev), bond_net_id);
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));

pr_debug("Begin bond_init for %s\n", bond_dev->name);

/*
* Initialize locks that may be required during
* en/deslave operations. All of the bond_open work
* (of which this is part) should really be moved to
* a phase prior to dev_open
*/
spin_lock_init(&(bond_info->tx_hashtbl_lock));
spin_lock_init(&(bond_info->rx_hashtbl_lock));

bond->wq = create_singlethread_workqueue(bond_dev->name);
if (!bond->wq)
return -ENOMEM;
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,6 @@ static ssize_t bonding_store_slaves(struct device *d,
struct net_device *dev;
struct bonding *bond = to_bond(d);

/* Quick sanity check -- is the bond interface up? */
if (!(bond->dev->flags & IFF_UP)) {
pr_warning("%s: doing slave updates when interface is down.\n",
bond->dev->name);
}

if (!rtnl_trylock())
return restart_syscall();

Expand Down

0 comments on commit 9cc6d17

Please sign in to comment.