1

SUNRPC: fix _xprt_switch_find_current_entry logic

Fix the logic for picking current transport entry.

Fixes: 95d0d30c66 ("SUNRPC create an iterator to list only OFFLINE xprts")
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Olga Kornievskaia 2023-12-01 14:42:03 -05:00 committed by Anna Schumaker
parent 037e56a22f
commit 98b4e51375

View File

@ -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;