diff options
| author | Jiri Pirko <jiri@resnulli.us> | 2013-06-08 09:00:55 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-06-12 03:56:27 -0400 |
| commit | b79462a8b9f9a452edc20c64a70a89ba3b0a6a88 (patch) | |
| tree | 1fee0cd72cc92c6d0b3892c9b99af7a8e4382405 /include/linux | |
| parent | 72df935d985c1575ed44ad2c8c653b28147993fa (diff) | |
team: fix checks in team_get_first_port_txable_rcu()
should be checked if "cur" is txable, not "port".
Introduced by commit 6e88e1357c "team: use function team_port_txable()
for determing enabled and up port"
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/if_team.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 4474557904f6..16fae6436d0e 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
| @@ -249,12 +249,12 @@ team_get_first_port_txable_rcu(struct team *team, struct team_port *port) | |||
| 249 | return port; | 249 | return port; |
| 250 | cur = port; | 250 | cur = port; |
| 251 | list_for_each_entry_continue_rcu(cur, &team->port_list, list) | 251 | list_for_each_entry_continue_rcu(cur, &team->port_list, list) |
| 252 | if (team_port_txable(port)) | 252 | if (team_port_txable(cur)) |
| 253 | return cur; | 253 | return cur; |
| 254 | list_for_each_entry_rcu(cur, &team->port_list, list) { | 254 | list_for_each_entry_rcu(cur, &team->port_list, list) { |
| 255 | if (cur == port) | 255 | if (cur == port) |
| 256 | break; | 256 | break; |
| 257 | if (team_port_txable(port)) | 257 | if (team_port_txable(cur)) |
| 258 | return cur; | 258 | return cur; |
| 259 | } | 259 | } |
| 260 | return NULL; | 260 | return NULL; |
