ipv6: use spin_trylock_bh
authorStephen Hemminger <shemminger@vyatta.com>
Tue, 22 Jul 2008 21:34:35 +0000 (14:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jul 2008 21:34:35 +0000 (14:34 -0700)
Now there is spin_trylock_bh, use it rather than open coding.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_fib.c

index 03e23d058ec581bed41d00734d6059c456003a28..0ec7f2b636f0824f563e344b0e9ac1db11228a7c 100644 (file)
@@ -1447,10 +1447,8 @@ void fib6_run_gc(unsigned long expires, struct net *net)
                gc_args.timeout = expires ? (int)expires :
                        net->ipv6.sysctl.ip6_rt_gc_interval;
        } else {
-               local_bh_disable();
-               if (!spin_trylock(&fib6_gc_lock)) {
+               if (!spin_trylock_bh(&fib6_gc_lock)) {
                        mod_timer(&net->ipv6.ip6_fib_timer, jiffies + HZ);
-                       local_bh_enable();
                        return;
                }
                gc_args.timeout = net->ipv6.sysctl.ip6_rt_gc_interval;