|
@@ -1193,8 +1193,6 @@ static ssize_t bonding_show_active_slave(struct device *d,
|
|
struct bonding *bond = to_bond(d);
|
|
struct bonding *bond = to_bond(d);
|
|
int count;
|
|
int count;
|
|
|
|
|
|
- rtnl_lock();
|
|
|
|
-
|
|
|
|
read_lock(&bond->curr_slave_lock);
|
|
read_lock(&bond->curr_slave_lock);
|
|
curr = bond->curr_active_slave;
|
|
curr = bond->curr_active_slave;
|
|
read_unlock(&bond->curr_slave_lock);
|
|
read_unlock(&bond->curr_slave_lock);
|
|
@@ -1216,7 +1214,9 @@ static ssize_t bonding_store_active_slave(struct device *d,
|
|
struct slave *new_active = NULL;
|
|
struct slave *new_active = NULL;
|
|
struct bonding *bond = to_bond(d);
|
|
struct bonding *bond = to_bond(d);
|
|
|
|
|
|
|
|
+ rtnl_lock();
|
|
write_lock_bh(&bond->lock);
|
|
write_lock_bh(&bond->lock);
|
|
|
|
+
|
|
if (!USES_PRIMARY(bond->params.mode)) {
|
|
if (!USES_PRIMARY(bond->params.mode)) {
|
|
printk(KERN_INFO DRV_NAME
|
|
printk(KERN_INFO DRV_NAME
|
|
": %s: Unable to change active slave; %s is in mode %d\n",
|
|
": %s: Unable to change active slave; %s is in mode %d\n",
|