summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2025-04-17 17:03:51 -0700
committerPaolo Abeni <pabeni@redhat.com>2025-04-24 09:29:56 +0200
commit5a1ccff5c65aa553429a8caf8f491d503d760568 (patch)
tree96e4f2bad27fb1aa892492aa3e122a7b5f6ebd10 /net/ipv6
parent87d5d921eaf225fc820907f3c6827e5d7cc85bc3 (diff)
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>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/route.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a687eec1eab00..aa4287ce49446 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -5315,7 +5315,7 @@ errout:
struct rt6_nh {
struct fib6_info *fib6_info;
struct fib6_config r_cfg;
- struct list_head next;
+ struct list_head list;
};
static int ip6_route_info_append(struct list_head *rt6_nh_list,
@@ -5325,7 +5325,7 @@ static int ip6_route_info_append(struct list_head *rt6_nh_list,
struct rt6_nh *nh;
int err = -EEXIST;
- list_for_each_entry(nh, rt6_nh_list, next) {
+ list_for_each_entry(nh, rt6_nh_list, list) {
/* check if fib6_info already exists */
if (rt6_duplicate_nexthop(nh->fib6_info, rt))
return err;
@@ -5336,7 +5336,7 @@ static int ip6_route_info_append(struct list_head *rt6_nh_list,
return -ENOMEM;
nh->fib6_info = rt;
memcpy(&nh->r_cfg, r_cfg, sizeof(*r_cfg));
- list_add_tail(&nh->next, rt6_nh_list);
+ list_add_tail(&nh->list, rt6_nh_list);
return 0;
}
@@ -5479,7 +5479,7 @@ static int ip6_route_multipath_add(struct fib6_config *cfg,
info->skip_notify_kernel = 1;
err_nh = NULL;
- list_for_each_entry(nh, &rt6_nh_list, next) {
+ list_for_each_entry(nh, &rt6_nh_list, list) {
err = __ip6_ins_rt(nh->fib6_info, info, extack);
if (err) {
@@ -5547,16 +5547,16 @@ add_errout:
ip6_route_mpath_notify(rt_notif, rt_last, info, nlflags);
/* Delete routes that were already added */
- list_for_each_entry(nh, &rt6_nh_list, next) {
+ list_for_each_entry(nh, &rt6_nh_list, list) {
if (err_nh == nh)
break;
ip6_route_del(&nh->r_cfg, extack);
}
cleanup:
- list_for_each_entry_safe(nh, nh_safe, &rt6_nh_list, next) {
+ list_for_each_entry_safe(nh, nh_safe, &rt6_nh_list, list) {
fib6_info_release(nh->fib6_info);
- list_del(&nh->next);
+ list_del(&nh->list);
kfree(nh);
}