diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-07-22 17:34:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-22 17:34:35 -0400 |
commit | a76d7345a3f92bb8352f200e7b2e380dddcd7e36 (patch) | |
tree | cf86c16ba208ef3af16d06fb941a592f754ad966 /net | |
parent | c8a4522245e9931a53a98d5160bb4c00d3f73921 (diff) |
ipv6: use spin_trylock_bh
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/ip6_fib.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 03e23d058ec5..0ec7f2b636f0 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -1447,10 +1447,8 @@ void fib6_run_gc(unsigned long expires, struct net *net) | |||
1447 | gc_args.timeout = expires ? (int)expires : | 1447 | gc_args.timeout = expires ? (int)expires : |
1448 | net->ipv6.sysctl.ip6_rt_gc_interval; | 1448 | net->ipv6.sysctl.ip6_rt_gc_interval; |
1449 | } else { | 1449 | } else { |
1450 | local_bh_disable(); | 1450 | if (!spin_trylock_bh(&fib6_gc_lock)) { |
1451 | if (!spin_trylock(&fib6_gc_lock)) { | ||
1452 | mod_timer(&net->ipv6.ip6_fib_timer, jiffies + HZ); | 1451 | mod_timer(&net->ipv6.ip6_fib_timer, jiffies + HZ); |
1453 | local_bh_enable(); | ||
1454 | return; | 1452 | return; |
1455 | } | 1453 | } |
1456 | gc_args.timeout = net->ipv6.sysctl.ip6_rt_gc_interval; | 1454 | gc_args.timeout = net->ipv6.sysctl.ip6_rt_gc_interval; |