diff options
| -rw-r--r-- | include/net/ip6_route.h | 2 | ||||
| -rw-r--r-- | net/ipv6/ip6_fib.c | 3 | ||||
| -rw-r--r-- | net/ipv6/route.c | 10 |
3 files changed, 6 insertions, 9 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 9313491e3dad..2f8b3c06a101 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
| @@ -68,7 +68,7 @@ extern struct rt6_info *rt6_lookup(struct net *net, | |||
| 68 | extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, | 68 | extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, |
| 69 | struct neighbour *neigh, | 69 | struct neighbour *neigh, |
| 70 | const struct in6_addr *addr); | 70 | const struct in6_addr *addr); |
| 71 | extern int icmp6_dst_gc(int *more); | 71 | extern int icmp6_dst_gc(void); |
| 72 | 72 | ||
| 73 | extern void fib6_force_start_gc(struct net *net); | 73 | extern void fib6_force_start_gc(struct net *net); |
| 74 | 74 | ||
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 | ||
| 981 | int icmp6_dst_gc(int *more) | 981 | int 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 | ||
| 1008 | static int ip6_dst_gc(struct dst_ops *ops) | 1006 | static int ip6_dst_gc(struct dst_ops *ops) |
