diff options
author | Jiri Pirko <jpirko@redhat.com> | 2009-09-17 22:13:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-01 17:34:29 -0400 |
commit | ce501caf162a2b18c50b6915684217c3b9e16b46 (patch) | |
tree | a373ef184d4dd1fa175617f1fdec7bc0f7eeef65 /drivers/net/bonding | |
parent | a98917acc73181668f2188ec617fea9ce3ac3944 (diff) |
bonding: set primary param via sysfs
Primary module parameter passed to bonding is pernament. That means if you
release the primary slave and enslave it again, it becomes the primary slave
again. But if you set primary slave via sysfs, the primary slave is only set
once and it's not remembered in bond->params structure. Therefore the setting is
lost after releasing the primary slave. This simple one-liner fixes this.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 6044e12ff9fc..ff449de6f3c0 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -1182,6 +1182,7 @@ static ssize_t bonding_store_primary(struct device *d, | |||
1182 | ": %s: Setting %s as primary slave.\n", | 1182 | ": %s: Setting %s as primary slave.\n", |
1183 | bond->dev->name, slave->dev->name); | 1183 | bond->dev->name, slave->dev->name); |
1184 | bond->primary_slave = slave; | 1184 | bond->primary_slave = slave; |
1185 | strcpy(bond->params.primary, slave->dev->name); | ||
1185 | bond_select_active_slave(bond); | 1186 | bond_select_active_slave(bond); |
1186 | goto out; | 1187 | goto out; |
1187 | } | 1188 | } |