]> Pileus Git - ~andy/linux/blobdiff - drivers/net/bonding/bonding.h
nfsd: fix lost nfserrno() call in nfsd_setattr()
[~andy/linux] / drivers / net / bonding / bonding.h
index 1a9062f4e0d6d4429d6cfb230867905b446615c5..86ccfb9f71cc4dd8c843f40f5eee38b7c0c033ab 100644 (file)
@@ -303,6 +303,19 @@ static inline void bond_set_backup_slave(struct slave *slave)
        }
 }
 
+static inline void bond_slave_state_change(struct bonding *bond)
+{
+       struct list_head *iter;
+       struct slave *tmp;
+
+       bond_for_each_slave(bond, tmp, iter) {
+               if (tmp->link == BOND_LINK_UP)
+                       bond_set_active_slave(tmp);
+               else if (tmp->link == BOND_LINK_DOWN)
+                       bond_set_backup_slave(tmp);
+       }
+}
+
 static inline int bond_slave_state(struct slave *slave)
 {
        return slave->backup;