Commit 0f3d042e authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

netfilter: use likely() in xt_info_rdlock_bh()

Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ec581f6a
...@@ -472,7 +472,7 @@ static inline void xt_info_rdlock_bh(void) ...@@ -472,7 +472,7 @@ static inline void xt_info_rdlock_bh(void)
local_bh_disable(); local_bh_disable();
lock = &__get_cpu_var(xt_info_locks); lock = &__get_cpu_var(xt_info_locks);
if (!lock->readers++) if (likely(!lock->readers++))
spin_lock(&lock->lock); spin_lock(&lock->lock);
} }
...@@ -480,7 +480,7 @@ static inline void xt_info_rdunlock_bh(void) ...@@ -480,7 +480,7 @@ static inline void xt_info_rdunlock_bh(void)
{ {
struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks);
if (!--lock->readers) if (likely(!--lock->readers))
spin_unlock(&lock->lock); spin_unlock(&lock->lock);
local_bh_enable(); local_bh_enable();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment