Skip to content

Commit

Permalink
SUNRPC: fix _xprt_switch_find_current_entry logic
Browse files Browse the repository at this point in the history
Fix the logic for picking current transport entry.

Fixes: 95d0d30 ("SUNRPC create an iterator to list only OFFLINE xprts")
Signed-off-by: Olga Kornievskaia <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
olgakorn1 authored and amschuma-ntap committed Jan 4, 2024
1 parent 037e56a commit 98b4e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/xprtmultipath.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ struct rpc_xprt *_xprt_switch_find_current_entry(struct list_head *head,
if (cur == pos)
found = true;
if (found && ((find_active && xprt_is_active(pos)) ||
(!find_active && xprt_is_active(pos))))
(!find_active && !xprt_is_active(pos))))
return pos;
}
return NULL;
Expand Down

0 comments on commit 98b4e51

Please sign in to comment.