提交 af3e5bd5 编写于 作者: H Hillf Danton 提交者: David S. Miller

bonding: Fix slave selection bug.

The returned slave is incorrect, if the net device under check is not
charged yet by the master.
Signed-off-by: NHillf Danton <dhillf@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 82cc4f5c
......@@ -269,11 +269,11 @@ static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct n
bond_for_each_slave(bond, slave, i) {
if (slave->dev == slave_dev) {
break;
return slave;
}
}
return slave;
return 0;
}
static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册