[PATCH] SUNRPC: _xprt_switch_find_current_entry return xprt with condition find_active

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



current function always return a active xprt or NULL no matter what find_active
---
 net/sunrpc/xprtmultipath.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/sunrpc/xprtmultipath.c b/net/sunrpc/xprtmultipath.c
index 701250b305db..94f3b5f444a1 100644
--- a/net/sunrpc/xprtmultipath.c
+++ b/net/sunrpc/xprtmultipath.c
@@ -283,8 +283,7 @@ struct rpc_xprt *_xprt_switch_find_current_entry(struct list_head *head,
 	list_for_each_entry_rcu(pos, head, xprt_switch) {
 		if (cur == pos)
 			found = true;
-		if (found && ((find_active && xprt_is_active(pos)) ||
-			      (!find_active && xprt_is_active(pos))))
+		if (found && (find_active == xprt_is_active(pos)))
 			return pos;
 	}
 	return NULL;
-- 
2.43.0.windows.1





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux