bonding: wrap slave state work

transfers slave->state into slave->backup (that it's going to transfer
into bitfield. Introduce wrapper inlines to do the work with it.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko
2011-03-12 03:14:37 +00:00
committed by David S. Miller
parent 0bd80dad57
commit e30bc066ab
4 changed files with 46 additions and 25 deletions

View File

@@ -1582,7 +1582,7 @@ static ssize_t bonding_store_slaves_active(struct device *d,
}
bond_for_each_slave(bond, slave, i) {
if (slave->state == BOND_STATE_BACKUP) {
if (!bond_is_active_slave(slave)) {
if (new_value)
slave->dev->priv_flags &= ~IFF_SLAVE_INACTIVE;
else