diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-07-23 23:52:07 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-28 10:58:16 -0700 |
commit | c8330bc571d037b43e116ddfc5ba4a93f334df52 (patch) | |
tree | b8f989b590cb855ad9b13d5304d0a4de43fc485f /net | |
parent | debf2f2593b0244eb81a4b66beef956a73b4e84f (diff) | |
download | lwn-c8330bc571d037b43e116ddfc5ba4a93f334df52.tar.gz lwn-c8330bc571d037b43e116ddfc5ba4a93f334df52.zip |
ipv6: use timer pending
[ Upstream commit 847499ce71bdcc8fc542062df6ebed3e596608dd ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/ip6_fib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index bab72b6f1444..dee7feac7b8c 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -679,7 +679,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt, static __inline__ void fib6_start_gc(struct rt6_info *rt) { - if (ip6_fib_timer.expires == 0 && + if (!timer_pending(&ip6_fib_timer) && (rt->rt6i_flags & (RTF_EXPIRES|RTF_CACHE))) mod_timer(&ip6_fib_timer, jiffies + init_net.ipv6.sysctl.ip6_rt_gc_interval); @@ -687,7 +687,7 @@ static __inline__ void fib6_start_gc(struct rt6_info *rt) void fib6_force_start_gc(void) { - if (ip6_fib_timer.expires == 0) + if (!timer_pending(&ip6_fib_timer)) mod_timer(&ip6_fib_timer, jiffies + init_net.ipv6.sysctl.ip6_rt_gc_interval); } |