Skip to content

Commit a76d734

Browse files
Stephen Hemmingerdavem330
authored andcommitted
ipv6: use spin_trylock_bh
Now there is spin_trylock_bh, use it rather than open coding. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c8a4522 commit a76d734

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

net/ipv6/ip6_fib.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,10 +1447,8 @@ void fib6_run_gc(unsigned long expires, struct net *net)
14471447
gc_args.timeout = expires ? (int)expires :
14481448
net->ipv6.sysctl.ip6_rt_gc_interval;
14491449
} else {
1450-
local_bh_disable();
1451-
if (!spin_trylock(&fib6_gc_lock)) {
1450+
if (!spin_trylock_bh(&fib6_gc_lock)) {
14521451
mod_timer(&net->ipv6.ip6_fib_timer, jiffies + HZ);
1453-
local_bh_enable();
14541452
return;
14551453
}
14561454
gc_args.timeout = net->ipv6.sysctl.ip6_rt_gc_interval;

0 commit comments

Comments
 (0)