diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 10 |
1 files changed, 4 insertions, 6 deletions
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) |