diff options
author | Veaceslav Falico <vfalico@redhat.com> | 2013-10-21 11:48:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-22 19:22:09 -0400 |
commit | 5378c2e6ea236de847a39bdb6f3aa83137120d26 (patch) | |
tree | 3fea10f4900112c624ff9474ef9453ecea8766d1 /net/batman-adv/gateway_client.c | |
parent | 666d10085924d9dd4bcab7653f5d4971d8ea2498 (diff) | |
download | op-kernel-dev-5378c2e6ea236de847a39bdb6f3aa83137120d26.zip op-kernel-dev-5378c2e6ea236de847a39bdb6f3aa83137120d26.tar.gz |
bonding: move bond-specific init after enslave happens
As Jiri noted, currently we first do all bonding-specific initialization
(specifically - bond_select_active_slave(bond)) before we actually attach
the slave (so that it becomes visible through bond_for_each_slave() and
friends). This might result in bond_select_active_slave() not seeing the
first/new slave and, thus, not actually selecting an active slave.
Fix this by moving all the bond-related init part after we've actually
completely initialized and linked (via bond_master_upper_dev_link()) the
new slave.
Also, remove the bond_(de/a)ttach_slave(), it's useless to have functions
to ++/-- one int.
After this we have all the initialization of the new slave *before*
linking, and all the stuff that needs to be done on bonding *after* it. It
has also a bonus effect - we can remove the locking on the new slave init
completely, and only use it for bond_select_active_slave().
Reported-by: Jiri Pirko <jiri@resnulli.us>
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Acked-by: Ding Tianhong@huawei.com
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv/gateway_client.c')
0 files changed, 0 insertions, 0 deletions