提交 b79462a8 编写于 作者: J Jiri Pirko 提交者: David S. Miller

team: fix checks in team_get_first_port_txable_rcu()

should be checked if "cur" is txable, not "port".

Introduced by commit 6e88e135 "team: use function team_port_txable()
for determing enabled and up port"
Signed-off-by: NJiri Pirko <jiri@resnulli.us>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 72df935d
......@@ -249,12 +249,12 @@ team_get_first_port_txable_rcu(struct team *team, struct team_port *port)
return port;
cur = port;
list_for_each_entry_continue_rcu(cur, &team->port_list, list)
if (team_port_txable(port))
if (team_port_txable(cur))
return cur;
list_for_each_entry_rcu(cur, &team->port_list, list) {
if (cur == port)
break;
if (team_port_txable(port))
if (team_port_txable(cur))
return cur;
}
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册