netfilter: use likely() in xt_info_rdlock_bh()

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2009-05-01 09:10:46 -07:00 committed by David S. Miller
parent ec581f6a42
commit 0f3d042ed2
1 changed files with 2 additions and 2 deletions

View File

@ -472,7 +472,7 @@ static inline void xt_info_rdlock_bh(void)
local_bh_disable();
lock = &__get_cpu_var(xt_info_locks);
if (!lock->readers++)
if (likely(!lock->readers++))
spin_lock(&lock->lock);
}
@ -480,7 +480,7 @@ static inline void xt_info_rdunlock_bh(void)
{
struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks);
if (!--lock->readers)
if (likely(!--lock->readers))
spin_unlock(&lock->lock);
local_bh_enable();
}