From b22808e9047613de61791330dccf3194988e4686 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 22 Jul 2008 14:35:50 -0700 Subject: [PATCH] --- yaml --- r: 104890 b: refs/heads/master c: 3d0f24a74e7957593a5622eb5c04ed6860dd8391 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/ip6_route.h | 2 +- trunk/net/ipv6/ip6_fib.c | 3 +-- trunk/net/ipv6/route.c | 10 ++++------ 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 847dd110d766..221a22ff572b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 75307c0fe7fcb3b52a92fe32384fc33f50622654 +refs/heads/master: 3d0f24a74e7957593a5622eb5c04ed6860dd8391 diff --git a/trunk/include/net/ip6_route.h b/trunk/include/net/ip6_route.h index 9313491e3dad..2f8b3c06a101 100644 --- a/trunk/include/net/ip6_route.h +++ b/trunk/include/net/ip6_route.h @@ -68,7 +68,7 @@ extern struct rt6_info *rt6_lookup(struct net *net, extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct neighbour *neigh, const struct in6_addr *addr); -extern int icmp6_dst_gc(int *more); +extern int icmp6_dst_gc(void); extern void fib6_force_start_gc(struct net *net); diff --git a/trunk/net/ipv6/ip6_fib.c b/trunk/net/ipv6/ip6_fib.c index c72fd2461ca5..08ea2de28d63 100644 --- a/trunk/net/ipv6/ip6_fib.c +++ b/trunk/net/ipv6/ip6_fib.c @@ -1453,9 +1453,8 @@ void fib6_run_gc(unsigned long expires, struct net *net) } gc_args.timeout = net->ipv6.sysctl.ip6_rt_gc_interval; } - gc_args.more = 0; - icmp6_dst_gc(&gc_args.more); + gc_args.more = icmp6_dst_gc(); fib6_clean_all(net, fib6_age, 0, NULL); diff --git a/trunk/net/ipv6/route.c b/trunk/net/ipv6/route.c index 615b328de251..86540b24b27c 100644 --- a/trunk/net/ipv6/route.c +++ b/trunk/net/ipv6/route.c @@ -978,13 +978,12 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, return &rt->u.dst; } -int icmp6_dst_gc(int *more) +int icmp6_dst_gc(void) { struct dst_entry *dst, *next, **pprev; - int freed; + int more = 0; next = NULL; - freed = 0; spin_lock_bh(&icmp6_dst_lock); pprev = &icmp6_dst_gc_list; @@ -993,16 +992,15 @@ int icmp6_dst_gc(int *more) if (!atomic_read(&dst->__refcnt)) { *pprev = dst->next; dst_free(dst); - freed++; } else { pprev = &dst->next; - (*more)++; + ++more; } } spin_unlock_bh(&icmp6_dst_lock); - return freed; + return more; } static int ip6_dst_gc(struct dst_ops *ops)