diff options
| -rw-r--r-- | drivers/net/bonding/bond_alb.c | 4 | ||||
| -rw-r--r-- | drivers/net/bonding/bond_main.c | 16 | ||||
| -rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 6 |
3 files changed, 10 insertions, 16 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 8f2d2e7c70e5..2df9276720a0 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
| @@ -163,8 +163,6 @@ static int tlb_initialize(struct bonding *bond) | |||
| 163 | struct tlb_client_info *new_hashtbl; | 163 | struct tlb_client_info *new_hashtbl; |
| 164 | int i; | 164 | int i; |
| 165 | 165 | ||
| 166 | spin_lock_init(&(bond_info->tx_hashtbl_lock)); | ||
| 167 | |||
| 168 | new_hashtbl = kzalloc(size, GFP_KERNEL); | 166 | new_hashtbl = kzalloc(size, GFP_KERNEL); |
| 169 | if (!new_hashtbl) { | 167 | if (!new_hashtbl) { |
| 170 | pr_err("%s: Error: Failed to allocate TLB hash table\n", | 168 | pr_err("%s: Error: Failed to allocate TLB hash table\n", |
| @@ -747,8 +745,6 @@ static int rlb_initialize(struct bonding *bond) | |||
| 747 | int size = RLB_HASH_TABLE_SIZE * sizeof(struct rlb_client_info); | 745 | int size = RLB_HASH_TABLE_SIZE * sizeof(struct rlb_client_info); |
| 748 | int i; | 746 | int i; |
| 749 | 747 | ||
| 750 | spin_lock_init(&(bond_info->rx_hashtbl_lock)); | ||
| 751 | |||
| 752 | new_hashtbl = kmalloc(size, GFP_KERNEL); | 748 | new_hashtbl = kmalloc(size, GFP_KERNEL); |
| 753 | if (!new_hashtbl) { | 749 | if (!new_hashtbl) { |
| 754 | pr_err("%s: Error: Failed to allocate RLB hash table\n", | 750 | pr_err("%s: Error: Failed to allocate RLB hash table\n", |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 6dc428461541..9ec4a505a79f 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
| @@ -1542,12 +1542,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
| 1542 | bond_dev->name, slave_dev->name); | 1542 | bond_dev->name, slave_dev->name); |
| 1543 | } | 1543 | } |
| 1544 | 1544 | ||
| 1545 | /* bond must be initialized by bond_open() before enslaving */ | ||
| 1546 | if (!(bond_dev->flags & IFF_UP)) { | ||
| 1547 | pr_warning("%s: master_dev is not up in bond_enslave\n", | ||
| 1548 | bond_dev->name); | ||
| 1549 | } | ||
| 1550 | |||
| 1551 | /* already enslaved */ | 1545 | /* already enslaved */ |
| 1552 | if (slave_dev->flags & IFF_SLAVE) { | 1546 | if (slave_dev->flags & IFF_SLAVE) { |
| 1553 | pr_debug("Error, Device was already enslaved\n"); | 1547 | pr_debug("Error, Device was already enslaved\n"); |
| @@ -4834,9 +4828,19 @@ static int bond_init(struct net_device *bond_dev) | |||
| 4834 | { | 4828 | { |
| 4835 | struct bonding *bond = netdev_priv(bond_dev); | 4829 | struct bonding *bond = netdev_priv(bond_dev); |
| 4836 | struct bond_net *bn = net_generic(dev_net(bond_dev), bond_net_id); | 4830 | struct bond_net *bn = net_generic(dev_net(bond_dev), bond_net_id); |
| 4831 | struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); | ||
| 4837 | 4832 | ||
| 4838 | pr_debug("Begin bond_init for %s\n", bond_dev->name); | 4833 | pr_debug("Begin bond_init for %s\n", bond_dev->name); |
| 4839 | 4834 | ||
| 4835 | /* | ||
| 4836 | * Initialize locks that may be required during | ||
| 4837 | * en/deslave operations. All of the bond_open work | ||
| 4838 | * (of which this is part) should really be moved to | ||
| 4839 | * a phase prior to dev_open | ||
| 4840 | */ | ||
| 4841 | spin_lock_init(&(bond_info->tx_hashtbl_lock)); | ||
| 4842 | spin_lock_init(&(bond_info->rx_hashtbl_lock)); | ||
| 4843 | |||
| 4840 | bond->wq = create_singlethread_workqueue(bond_dev->name); | 4844 | bond->wq = create_singlethread_workqueue(bond_dev->name); |
| 4841 | if (!bond->wq) | 4845 | if (!bond->wq) |
| 4842 | return -ENOMEM; | 4846 | return -ENOMEM; |
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 4059bfc73dbf..bb1319f9f173 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
| @@ -227,12 +227,6 @@ static ssize_t bonding_store_slaves(struct device *d, | |||
| 227 | struct net_device *dev; | 227 | struct net_device *dev; |
| 228 | struct bonding *bond = to_bond(d); | 228 | struct bonding *bond = to_bond(d); |
| 229 | 229 | ||
| 230 | /* Quick sanity check -- is the bond interface up? */ | ||
| 231 | if (!(bond->dev->flags & IFF_UP)) { | ||
| 232 | pr_warning("%s: doing slave updates when interface is down.\n", | ||
| 233 | bond->dev->name); | ||
| 234 | } | ||
| 235 | |||
| 236 | if (!rtnl_trylock()) | 230 | if (!rtnl_trylock()) |
| 237 | return restart_syscall(); | 231 | return restart_syscall(); |
| 238 | 232 | ||
