summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_sysfs.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-03-12 03:14:37 (GMT)
committerDavid S. Miller <davem@davemloft.net>2011-03-16 19:51:20 (GMT)
commite30bc066ab67a4c8abcb972227ffe7c576f06a86 (patch)
tree923689cd4ceade32c85d602a59b4e5feb320c300 /drivers/net/bonding/bond_sysfs.c
parent0bd80dad57d82676ee484fb1f9aa4c5e8b5bc469 (diff)
downloadlinux-fsl-qoriq-e30bc066ab67a4c8abcb972227ffe7c576f06a86.tar.xz
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>
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r--drivers/net/bonding/bond_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 3a530eb..c81b97c 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -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