OSDN Git Service

ipv6: slight optimization in ip6_dst_gc
authorLi RongQing <roy.qing.li@gmail.com>
Mon, 19 May 2014 09:30:28 +0000 (17:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 May 2014 19:52:23 +0000 (15:52 -0400)
entries is always greater than rt_max_size here, since if entries is less
than rt_max_size, the fib6_run_gc function will be skipped

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index f0a8ff9..aa883af 100644 (file)
@@ -1455,7 +1455,7 @@ static int ip6_dst_gc(struct dst_ops *ops)
                goto out;
 
        net->ipv6.ip6_rt_gc_expire++;
-       fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net, entries > rt_max_size);
+       fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net, true);
        entries = dst_entries_get_slow(ops);
        if (entries < ops->gc_thresh)
                net->ipv6.ip6_rt_gc_expire = rt_gc_timeout>>1;