aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-07-21 16:21:35 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-21 16:21:35 -0400
commit847499ce71bdcc8fc542062df6ebed3e596608dd (patch)
tree94e7daee7bf9aa15c32bcd8816cc86aad1ff0d10 /net
parent3a33cc108d11fab2a2544e2601066ba4924736aa (diff)
ipv6: use timer pending
This fixes the bridge reference count problem and cleanups ipv6 FIB timer management. Don't use expires field, because it is not a proper way to test, instead use timer_pending(). Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ip6_fib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 4de2b9efcacb..944095cf5e32 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -661,17 +661,17 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
661 661
662static __inline__ void fib6_start_gc(struct net *net, struct rt6_info *rt) 662static __inline__ void fib6_start_gc(struct net *net, struct rt6_info *rt)
663{ 663{
664 if (net->ipv6.ip6_fib_timer->expires == 0 && 664 if (!timer_pending(net->ipv6.ip6_fib_timer) &&
665 (rt->rt6i_flags & (RTF_EXPIRES|RTF_CACHE))) 665 (rt->rt6i_flags & (RTF_EXPIRES|RTF_CACHE)))
666 mod_timer(net->ipv6.ip6_fib_timer, jiffies + 666 mod_timer(net->ipv6.ip6_fib_timer,
667 net->ipv6.sysctl.ip6_rt_gc_interval); 667 jiffies + net->ipv6.sysctl.ip6_rt_gc_interval);
668} 668}
669 669
670void fib6_force_start_gc(struct net *net) 670void fib6_force_start_gc(struct net *net)
671{ 671{
672 if (net->ipv6.ip6_fib_timer->expires == 0) 672 if (!timer_pending(net->ipv6.ip6_fib_timer))
673 mod_timer(net->ipv6.ip6_fib_timer, jiffies + 673 mod_timer(net->ipv6.ip6_fib_timer,
674 net->ipv6.sysctl.ip6_rt_gc_interval); 674 jiffies + net->ipv6.sysctl.ip6_rt_gc_interval);
675} 675}
676 676
677/* 677/*