aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6_fib.c3
-rw-r--r--net/ipv6/route.c10
2 files changed, 5 insertions, 8 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index c72fd2461ca5..08ea2de28d63 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1453,9 +1453,8 @@ void fib6_run_gc(unsigned long expires, struct net *net)
1453 } 1453 }
1454 gc_args.timeout = net->ipv6.sysctl.ip6_rt_gc_interval; 1454 gc_args.timeout = net->ipv6.sysctl.ip6_rt_gc_interval;
1455 } 1455 }
1456 gc_args.more = 0;
1457 1456
1458 icmp6_dst_gc(&gc_args.more); 1457 gc_args.more = icmp6_dst_gc();
1459 1458
1460 fib6_clean_all(net, fib6_age, 0, NULL); 1459 fib6_clean_all(net, fib6_age, 0, NULL);
1461 1460
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 615b328de251..86540b24b27c 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -978,13 +978,12 @@ out:
978 return &rt->u.dst; 978 return &rt->u.dst;
979} 979}
980 980
981int icmp6_dst_gc(int *more) 981int icmp6_dst_gc(void)
982{ 982{
983 struct dst_entry *dst, *next, **pprev; 983 struct dst_entry *dst, *next, **pprev;
984 int freed; 984 int more = 0;
985 985
986 next = NULL; 986 next = NULL;
987 freed = 0;
988 987
989 spin_lock_bh(&icmp6_dst_lock); 988 spin_lock_bh(&icmp6_dst_lock);
990 pprev = &icmp6_dst_gc_list; 989 pprev = &icmp6_dst_gc_list;
@@ -993,16 +992,15 @@ int icmp6_dst_gc(int *more)
993 if (!atomic_read(&dst->__refcnt)) { 992 if (!atomic_read(&dst->__refcnt)) {
994 *pprev = dst->next; 993 *pprev = dst->next;
995 dst_free(dst); 994 dst_free(dst);
996 freed++;
997 } else { 995 } else {
998 pprev = &dst->next; 996 pprev = &dst->next;
999 (*more)++; 997 ++more;
1000 } 998 }
1001 } 999 }
1002 1000
1003 spin_unlock_bh(&icmp6_dst_lock); 1001 spin_unlock_bh(&icmp6_dst_lock);
1004 1002
1005 return freed; 1003 return more;
1006} 1004}
1007 1005
1008static int ip6_dst_gc(struct dst_ops *ops) 1006static int ip6_dst_gc(struct dst_ops *ops)