projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec581f6
)
netfilter: use likely() in xt_info_rdlock_bh()
author
Eric Dumazet
<dada1@cosmosbay.com>
Fri, 1 May 2009 16:10:46 +0000
(09:10 -0700)
committer
David S. Miller
<davem@davemloft.net>
Fri, 1 May 2009 16:10:46 +0000
(09:10 -0700)
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netfilter/x_tables.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/netfilter/x_tables.h
b/include/linux/netfilter/x_tables.h
index 1b2e43502ef77b63e50a428a3b61dcfa956da967..c9efe039dc57c4e2c2dce6ec11751a3d6d1c9819 100644
(file)
--- 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();
}