From: Eric Dumazet Date: Fri, 1 May 2009 16:10:46 +0000 (-0700) Subject: netfilter: use likely() in xt_info_rdlock_bh() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f3d042ed2f934f149ccb78300454beaf0c1134b;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git netfilter: use likely() in xt_info_rdlock_bh() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 1b2e43502ef..c9efe039dc5 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(); }