提交 a76d7345 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

ipv6: use spin_trylock_bh

Now there is spin_trylock_bh, use it rather than open coding.
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c8a45222
...@@ -1447,10 +1447,8 @@ void fib6_run_gc(unsigned long expires, struct net *net) ...@@ -1447,10 +1447,8 @@ void fib6_run_gc(unsigned long expires, struct net *net)
gc_args.timeout = expires ? (int)expires : gc_args.timeout = expires ? (int)expires :
net->ipv6.sysctl.ip6_rt_gc_interval; net->ipv6.sysctl.ip6_rt_gc_interval;
} else { } else {
local_bh_disable(); if (!spin_trylock_bh(&fib6_gc_lock)) {
if (!spin_trylock(&fib6_gc_lock)) {
mod_timer(&net->ipv6.ip6_fib_timer, jiffies + HZ); mod_timer(&net->ipv6.ip6_fib_timer, jiffies + HZ);
local_bh_enable();
return; return;
} }
gc_args.timeout = net->ipv6.sysctl.ip6_rt_gc_interval; gc_args.timeout = net->ipv6.sysctl.ip6_rt_gc_interval;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册