]> Git Repo - linux.git/commitdiff
bonding: commit link status change after propose
authorWANG Cong <[email protected]>
Tue, 25 Jul 2017 16:44:25 +0000 (09:44 -0700)
committerDavid S. Miller <[email protected]>
Wed, 26 Jul 2017 20:41:21 +0000 (13:41 -0700)
Commit de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
moves link status commitment into bond_mii_monitor(), but it still relies
on the return value of bond_miimon_inspect() as the hint. We need to return
non-zero as long as we propose a link status change.

Fixes: de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
Reported-by: Benjamin Gilbert <[email protected]>
Tested-by: Benjamin Gilbert <[email protected]>
Cc: Mahesh Bandewar <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Acked-by: Mahesh Bandewar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/bonding/bond_main.c

index 181839d6fbea44a8b6962f94703e4293645cc21c..9bee6c1c70cca33941ae8db8002d69e760693bac 100644 (file)
@@ -2050,6 +2050,7 @@ static int bond_miimon_inspect(struct bonding *bond)
                                continue;
 
                        bond_propose_link_state(slave, BOND_LINK_FAIL);
+                       commit++;
                        slave->delay = bond->params.downdelay;
                        if (slave->delay) {
                                netdev_info(bond->dev, "link status down for %sinterface %s, disabling it in %d ms\n",
@@ -2088,6 +2089,7 @@ static int bond_miimon_inspect(struct bonding *bond)
                                continue;
 
                        bond_propose_link_state(slave, BOND_LINK_BACK);
+                       commit++;
                        slave->delay = bond->params.updelay;
 
                        if (slave->delay) {
This page took 0.063542 seconds and 4 git commands to generate.