Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipv6: Rename rt6_nh.next to rt6_nh.list.

ip6_route_multipath_add() allocates struct rt6_nh for each config
of multipath routes to link them to a local list rt6_nh_list.

struct rt6_nh.next is the list node of each config, so the name
is quite misleading.

Let's rename it to list.

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/netdev/c9bee472-c94e-4878-8cc2-1512b2c54db5@redhat.com/
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250418000443.43734-11-kuniyu@amazon.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Kuniyuki Iwashima and committed by
Paolo Abeni
5a1ccff5 87d5d921

+7 -7
+7 -7
net/ipv6/route.c
··· 5315 5315 struct rt6_nh { 5316 5316 struct fib6_info *fib6_info; 5317 5317 struct fib6_config r_cfg; 5318 - struct list_head next; 5318 + struct list_head list; 5319 5319 }; 5320 5320 5321 5321 static int ip6_route_info_append(struct list_head *rt6_nh_list, ··· 5325 5325 struct rt6_nh *nh; 5326 5326 int err = -EEXIST; 5327 5327 5328 - list_for_each_entry(nh, rt6_nh_list, next) { 5328 + list_for_each_entry(nh, rt6_nh_list, list) { 5329 5329 /* check if fib6_info already exists */ 5330 5330 if (rt6_duplicate_nexthop(nh->fib6_info, rt)) 5331 5331 return err; ··· 5336 5336 return -ENOMEM; 5337 5337 nh->fib6_info = rt; 5338 5338 memcpy(&nh->r_cfg, r_cfg, sizeof(*r_cfg)); 5339 - list_add_tail(&nh->next, rt6_nh_list); 5339 + list_add_tail(&nh->list, rt6_nh_list); 5340 5340 5341 5341 return 0; 5342 5342 } ··· 5479 5479 info->skip_notify_kernel = 1; 5480 5480 5481 5481 err_nh = NULL; 5482 - list_for_each_entry(nh, &rt6_nh_list, next) { 5482 + list_for_each_entry(nh, &rt6_nh_list, list) { 5483 5483 err = __ip6_ins_rt(nh->fib6_info, info, extack); 5484 5484 5485 5485 if (err) { ··· 5547 5547 ip6_route_mpath_notify(rt_notif, rt_last, info, nlflags); 5548 5548 5549 5549 /* Delete routes that were already added */ 5550 - list_for_each_entry(nh, &rt6_nh_list, next) { 5550 + list_for_each_entry(nh, &rt6_nh_list, list) { 5551 5551 if (err_nh == nh) 5552 5552 break; 5553 5553 ip6_route_del(&nh->r_cfg, extack); 5554 5554 } 5555 5555 5556 5556 cleanup: 5557 - list_for_each_entry_safe(nh, nh_safe, &rt6_nh_list, next) { 5557 + list_for_each_entry_safe(nh, nh_safe, &rt6_nh_list, list) { 5558 5558 fib6_info_release(nh->fib6_info); 5559 - list_del(&nh->next); 5559 + list_del(&nh->list); 5560 5560 kfree(nh); 5561 5561 } 5562 5562