diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 824c424f9648..b70f8979003b 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1311,7 +1311,6 @@ static void icmp6_clean_all(int (*func)(struct rt6_info *rt, void *arg), | |||
1311 | 1311 | ||
1312 | static int ip6_dst_gc(struct dst_ops *ops) | 1312 | static int ip6_dst_gc(struct dst_ops *ops) |
1313 | { | 1313 | { |
1314 | unsigned long now = jiffies; | ||
1315 | struct net *net = container_of(ops, struct net, ipv6.ip6_dst_ops); | 1314 | struct net *net = container_of(ops, struct net, ipv6.ip6_dst_ops); |
1316 | int rt_min_interval = net->ipv6.sysctl.ip6_rt_gc_min_interval; | 1315 | int rt_min_interval = net->ipv6.sysctl.ip6_rt_gc_min_interval; |
1317 | int rt_max_size = net->ipv6.sysctl.ip6_rt_max_size; | 1316 | int rt_max_size = net->ipv6.sysctl.ip6_rt_max_size; |
@@ -1321,13 +1320,12 @@ static int ip6_dst_gc(struct dst_ops *ops) | |||
1321 | int entries; | 1320 | int entries; |
1322 | 1321 | ||
1323 | entries = dst_entries_get_fast(ops); | 1322 | entries = dst_entries_get_fast(ops); |
1324 | if (time_after(rt_last_gc + rt_min_interval, now) && | 1323 | if (time_after(rt_last_gc + rt_min_interval, jiffies) && |
1325 | entries <= rt_max_size) | 1324 | entries <= rt_max_size) |
1326 | goto out; | 1325 | goto out; |
1327 | 1326 | ||
1328 | net->ipv6.ip6_rt_gc_expire++; | 1327 | net->ipv6.ip6_rt_gc_expire++; |
1329 | fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net, entries > rt_max_size); | 1328 | fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net, entries > rt_max_size); |
1330 | net->ipv6.ip6_rt_last_gc = now; | ||
1331 | entries = dst_entries_get_slow(ops); | 1329 | entries = dst_entries_get_slow(ops); |
1332 | if (entries < ops->gc_thresh) | 1330 | if (entries < ops->gc_thresh) |
1333 | net->ipv6.ip6_rt_gc_expire = rt_gc_timeout>>1; | 1331 | net->ipv6.ip6_rt_gc_expire = rt_gc_timeout>>1; |