|
@@ -1846,9 +1846,9 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
|
|
*/
|
|
*/
|
|
void bond_destroy(struct bonding *bond)
|
|
void bond_destroy(struct bonding *bond)
|
|
{
|
|
{
|
|
|
|
+ unregister_netdevice(bond->dev);
|
|
bond_deinit(bond->dev);
|
|
bond_deinit(bond->dev);
|
|
bond_destroy_sysfs_entry(bond);
|
|
bond_destroy_sysfs_entry(bond);
|
|
- unregister_netdevice(bond->dev);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -2057,9 +2057,9 @@ static int bond_info_query(struct net_device *bond_dev, struct ifbond *info)
|
|
info->bond_mode = bond->params.mode;
|
|
info->bond_mode = bond->params.mode;
|
|
info->miimon = bond->params.miimon;
|
|
info->miimon = bond->params.miimon;
|
|
|
|
|
|
- read_lock_bh(&bond->lock);
|
|
|
|
|
|
+ read_lock(&bond->lock);
|
|
info->num_slaves = bond->slave_cnt;
|
|
info->num_slaves = bond->slave_cnt;
|
|
- read_unlock_bh(&bond->lock);
|
|
|
|
|
|
+ read_unlock(&bond->lock);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -2074,7 +2074,7 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
}
|
|
}
|
|
|
|
|
|
- read_lock_bh(&bond->lock);
|
|
|
|
|
|
+ read_lock(&bond->lock);
|
|
|
|
|
|
bond_for_each_slave(bond, slave, i) {
|
|
bond_for_each_slave(bond, slave, i) {
|
|
if (i == (int)info->slave_id) {
|
|
if (i == (int)info->slave_id) {
|
|
@@ -2083,7 +2083,7 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- read_unlock_bh(&bond->lock);
|
|
|
|
|
|
+ read_unlock(&bond->lock);
|
|
|
|
|
|
if (found) {
|
|
if (found) {
|
|
strcpy(info->slave_name, slave->dev->name);
|
|
strcpy(info->slave_name, slave->dev->name);
|
|
@@ -3078,7 +3078,7 @@ static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
|
|
|
|
|
|
/* make sure the bond won't be taken away */
|
|
/* make sure the bond won't be taken away */
|
|
read_lock(&dev_base_lock);
|
|
read_lock(&dev_base_lock);
|
|
- read_lock_bh(&bond->lock);
|
|
|
|
|
|
+ read_lock(&bond->lock);
|
|
|
|
|
|
if (*pos == 0) {
|
|
if (*pos == 0) {
|
|
return SEQ_START_TOKEN;
|
|
return SEQ_START_TOKEN;
|
|
@@ -3112,7 +3112,7 @@ static void bond_info_seq_stop(struct seq_file *seq, void *v)
|
|
{
|
|
{
|
|
struct bonding *bond = seq->private;
|
|
struct bonding *bond = seq->private;
|
|
|
|
|
|
- read_unlock_bh(&bond->lock);
|
|
|
|
|
|
+ read_unlock(&bond->lock);
|
|
read_unlock(&dev_base_lock);
|
|
read_unlock(&dev_base_lock);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3821,13 +3821,13 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
|
|
if (mii->reg_num == 1) {
|
|
if (mii->reg_num == 1) {
|
|
struct bonding *bond = bond_dev->priv;
|
|
struct bonding *bond = bond_dev->priv;
|
|
mii->val_out = 0;
|
|
mii->val_out = 0;
|
|
- read_lock_bh(&bond->lock);
|
|
|
|
|
|
+ read_lock(&bond->lock);
|
|
read_lock(&bond->curr_slave_lock);
|
|
read_lock(&bond->curr_slave_lock);
|
|
if (netif_carrier_ok(bond->dev)) {
|
|
if (netif_carrier_ok(bond->dev)) {
|
|
mii->val_out = BMSR_LSTATUS;
|
|
mii->val_out = BMSR_LSTATUS;
|
|
}
|
|
}
|
|
read_unlock(&bond->curr_slave_lock);
|
|
read_unlock(&bond->curr_slave_lock);
|
|
- read_unlock_bh(&bond->lock);
|
|
|
|
|
|
+ read_unlock(&bond->lock);
|
|
}
|
|
}
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
@@ -4473,8 +4473,8 @@ static void bond_free_all(void)
|
|
bond_mc_list_destroy(bond);
|
|
bond_mc_list_destroy(bond);
|
|
/* Release the bonded slaves */
|
|
/* Release the bonded slaves */
|
|
bond_release_all(bond_dev);
|
|
bond_release_all(bond_dev);
|
|
- bond_deinit(bond_dev);
|
|
|
|
unregister_netdevice(bond_dev);
|
|
unregister_netdevice(bond_dev);
|
|
|
|
+ bond_deinit(bond_dev);
|
|
}
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_PROC_FS
|
|
#ifdef CONFIG_PROC_FS
|