[lustre-devel] [PATCH 36/40] lnet: lnet_parse_route uses wrong loop var

James Simmons <[email protected]> Sun, 9 Apr 2023 08:13:16 -0400
Newsgroups org.lustre.lists.lustre-devel
Message-ID <[email protected]>
From: Chris Horn <[email protected]>

When looping over the gateways list, we're referencing the wrong
loop variable to get the gateway nid (ltb instead of ltb2).

Fixes: 1a77031c36 ("lustre: lnet/config: convert list_for_each to list_for_each_entry")
WC-bug-id: https://jira.whamcloud.com/browse/LU-16606
Lustre-commit: 0a414b1077a2f9dbc ("LU-16606 lnet: lnet_parse_route uses wrong loop var")
Signed-off-by: Chris Horn <[email protected]>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50173
Reviewed-by: jsimmons <[email protected]>
Reviewed-by: Serguei Smirnov <[email protected]>
Reviewed-by: Oleg Drokin <[email protected]>
Signed-off-by: James Simmons <[email protected]>
---
 net/lnet/lnet/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/lnet/lnet/config.c b/net/lnet/lnet/config.c
index a54e1db..c239f9c 100644
--- a/net/lnet/lnet/config.c
+++ b/net/lnet/lnet/config.c
@@ -1168,7 +1168,7 @@ struct lnet_ni *
 		LASSERT(net != LNET_NET_ANY);
 
 		list_for_each_entry(ltb2, &gateways, ltb_list) {
-			LASSERT(libcfs_strnid(&nid, ltb->ltb_text) == 0);
+			LASSERT(libcfs_strnid(&nid, ltb2->ltb_text) == 0);
 
 			if (lnet_islocalnid(&nid)) {
 				*im_a_router = 1;
-- 
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org