diff mbox series

[36/40] lnet: lnet_parse_route uses wrong loop var

Message ID 1681042400-15491-37-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: backport OpenSFS changes from March XX, 2023 | expand

Commit Message

James Simmons April 9, 2023, 12:13 p.m. UTC
From: Chris Horn <chris.horn@hpe.com>

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 <chris.horn@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50173
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 net/lnet/lnet/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;