aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2013-08-14 08:14:50 -0700
committerKevin Hilman <khilman@linaro.org>2013-08-14 08:14:50 -0700
commit080e3da4f4bf693ec59bd98eae3ee5bd5b1dd047 (patch)
tree2a367e97dcffe9ced54ff71b03ab893a3248fdb4 /net/ipv6/route.c
parentMerge tag 'renesas-multiplatform-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt (diff)
parentarm: zynq: dt: Set correct L2 ram latencies (diff)
downloadlinux-dev-080e3da4f4bf693ec59bd98eae3ee5bd5b1dd047.tar.xz
linux-dev-080e3da4f4bf693ec59bd98eae3ee5bd5b1dd047.zip
Merge branch 'zynq/dt' into next/dt
* zynq/dt: (1054 commits) arm: zynq: dt: Set correct L2 ram latencies + v3.11-rc5 Conflicts: arch/arm/Makefile
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a8c891aa2464..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),
static int ip6_dst_gc(struct dst_ops *ops)
{
- unsigned long now = jiffies;
struct net *net = container_of(ops, struct net, ipv6.ip6_dst_ops);
int rt_min_interval = net->ipv6.sysctl.ip6_rt_gc_min_interval;
int rt_max_size = net->ipv6.sysctl.ip6_rt_max_size;
@@ -1321,13 +1320,12 @@ static int ip6_dst_gc(struct dst_ops *ops)
int entries;
entries = dst_entries_get_fast(ops);
- if (time_after(rt_last_gc + rt_min_interval, now) &&
+ if (time_after(rt_last_gc + rt_min_interval, jiffies) &&
entries <= rt_max_size)
goto out;
net->ipv6.ip6_rt_gc_expire++;
- fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net);
- net->ipv6.ip6_rt_last_gc = now;
+ fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net, entries > rt_max_size);
entries = dst_entries_get_slow(ops);
if (entries < ops->gc_thresh)
net->ipv6.ip6_rt_gc_expire = rt_gc_timeout>>1;
@@ -2827,7 +2825,7 @@ int ipv6_sysctl_rtcache_flush(struct ctl_table *ctl, int write,
net = (struct net *)ctl->extra1;
delay = net->ipv6.sysctl.flush_delay;
proc_dointvec(ctl, write, buffer, lenp, ppos);
- fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net);
+ fib6_run_gc(delay <= 0 ? 0 : (unsigned long)delay, net, delay > 0);
return 0;
}