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: Cleanup fib6_drop_pcpu_from()

Since commit 0e2338749192 ("ipv6: fix races in ip6_dst_destroy()"),
'table' is unused in __fib6_drop_pcpu_from(), no need pass it from
fib6_drop_pcpu_from().

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250701041235.1333687-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Yue Haibing and committed by
Paolo Abeni
5f712c38 12967695

+7 -19
+7 -19
net/ipv6/ip6_fib.c
··· 963 963 } 964 964 965 965 static void __fib6_drop_pcpu_from(struct fib6_nh *fib6_nh, 966 - const struct fib6_info *match, 967 - const struct fib6_table *table) 966 + const struct fib6_info *match) 968 967 { 969 968 int cpu; 970 969 ··· 998 999 rcu_read_unlock(); 999 1000 } 1000 1001 1001 - struct fib6_nh_pcpu_arg { 1002 - struct fib6_info *from; 1003 - const struct fib6_table *table; 1004 - }; 1005 - 1006 1002 static int fib6_nh_drop_pcpu_from(struct fib6_nh *nh, void *_arg) 1007 1003 { 1008 - struct fib6_nh_pcpu_arg *arg = _arg; 1004 + struct fib6_info *arg = _arg; 1009 1005 1010 - __fib6_drop_pcpu_from(nh, arg->from, arg->table); 1006 + __fib6_drop_pcpu_from(nh, arg); 1011 1007 return 0; 1012 1008 } 1013 1009 1014 - static void fib6_drop_pcpu_from(struct fib6_info *f6i, 1015 - const struct fib6_table *table) 1010 + static void fib6_drop_pcpu_from(struct fib6_info *f6i) 1016 1011 { 1017 1012 /* Make sure rt6_make_pcpu_route() wont add other percpu routes 1018 1013 * while we are cleaning them here. ··· 1015 1022 mb(); /* paired with the cmpxchg() in rt6_make_pcpu_route() */ 1016 1023 1017 1024 if (f6i->nh) { 1018 - struct fib6_nh_pcpu_arg arg = { 1019 - .from = f6i, 1020 - .table = table 1021 - }; 1022 - 1023 1025 rcu_read_lock(); 1024 - nexthop_for_each_fib6_nh(f6i->nh, fib6_nh_drop_pcpu_from, &arg); 1026 + nexthop_for_each_fib6_nh(f6i->nh, fib6_nh_drop_pcpu_from, f6i); 1025 1027 rcu_read_unlock(); 1026 1028 } else { 1027 1029 struct fib6_nh *fib6_nh; 1028 1030 1029 1031 fib6_nh = f6i->fib6_nh; 1030 - __fib6_drop_pcpu_from(fib6_nh, f6i, table); 1032 + __fib6_drop_pcpu_from(fib6_nh, f6i); 1031 1033 } 1032 1034 } 1033 1035 ··· 1033 1045 1034 1046 /* Flush all cached dst in exception table */ 1035 1047 rt6_flush_exceptions(rt); 1036 - fib6_drop_pcpu_from(rt, table); 1048 + fib6_drop_pcpu_from(rt); 1037 1049 1038 1050 if (rt->nh) { 1039 1051 spin_lock(&rt->nh->lock);