aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-07-22 17:35:50 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-22 17:35:50 -0400
commit3d0f24a74e7957593a5622eb5c04ed6860dd8391 (patch)
tree52c17c0606f47f5435ada93baf63d1a585a2ccb9 /net/ipv6/route.c
parent75307c0fe7fcb3b52a92fe32384fc33f50622654 (diff)
ipv6: icmp6_dst_gc return change
Change icmp6_dst_gc to return the one value the caller cares about rather than using call by reference. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c10
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
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)