linux/drivers/net/bonding
Veaceslav Falico 5378c2e6ea 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>
2013-10-22 19:22:09 -04:00
..
bond_3ad.c bonding: use RCU protection for 3ad xmit path 2013-10-17 15:32:03 -04:00
bond_3ad.h bonding: fix multiple 3ad mode sysfs race conditions 2013-05-19 23:25:49 -07:00
bond_alb.c bonding: use RCU protection for alb xmit path 2013-10-17 15:32:03 -04:00
bond_alb.h bonding: rework rlb_next_rx_slave() to use bond_for_each_slave() 2013-09-26 16:02:05 -04:00
bond_debugfs.c bonding: delete migrated IP addresses from the rlb hash table 2012-11-30 12:07:27 -05:00
bond_main.c bonding: move bond-specific init after enslave happens 2013-10-22 19:22:09 -04:00
bond_netlink.c bonding: Remove __exit tag from bond_netlink_fini(). 2013-10-19 19:09:18 -04:00
bond_options.c bonding: move active_slave getting into separate function 2013-10-19 18:58:45 -04:00
bond_procfs.c bonding: don't use bond_next_slave() in bond_info_seq_next() 2013-09-28 15:28:06 -07:00
bond_sysfs.c bonding: move active_slave getting into separate function 2013-10-19 18:58:45 -04:00
bonding.h bonding: move active_slave getting into separate function 2013-10-19 18:58:45 -04:00
Makefile bonding: move mode setting into separate function 2013-10-19 18:58:45 -04:00