summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2009-05-01 09:10:46 -0700
committerDavid S. Miller <davem@davemloft.net>2009-05-01 09:10:46 -0700
commit0f3d042ed2f934f149ccb78300454beaf0c1134b (patch)
treee8bf6955d133bf528ba8bbec0231a116755aace5 /include
parentec581f6a42bbbea5271c66da9769a41b46c74e10 (diff)
downloadop-kernel-dev-0f3d042ed2f934f149ccb78300454beaf0c1134b.zip
op-kernel-dev-0f3d042ed2f934f149ccb78300454beaf0c1134b.tar.gz
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter/x_tables.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 1b2e435..c9efe03 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -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();
}
OpenPOWER on IntegriCloud