diff options
author | Li RongQing <lirongqing@baidu.com> | 2019-08-23 15:42:48 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-08-27 18:07:03 +0200 |
commit | 44b63b0a718fa9aac13c9e88cee9c45a3332b03f (patch) | |
tree | e3bc400941e6aeac378222e95eb32c9ab89fab7f /net/netfilter/nf_conntrack_core.c | |
parent | d0a8d877da976c244092ce859683b2fa116217db (diff) | |
download | linux-44b63b0a718fa9aac13c9e88cee9c45a3332b03f.tar.bz2 |
netfilter: not mark a spinlock as __read_mostly
when spinlock is locked/unlocked, its elements will be changed,
so marking it as __read_mostly is not suitable.
and remove a duplicate definition of nf_conntrack_locks_all_lock
strange that compiler does not complain.
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_conntrack_core.c')
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 81a8ef42b88d..0c63120b2db2 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -73,8 +73,7 @@ struct conntrack_gc_work { }; static __read_mostly struct kmem_cache *nf_conntrack_cachep; -static __read_mostly spinlock_t nf_conntrack_locks_all_lock; -static __read_mostly DEFINE_SPINLOCK(nf_conntrack_locks_all_lock); +static DEFINE_SPINLOCK(nf_conntrack_locks_all_lock); static __read_mostly bool nf_conntrack_locks_all; /* every gc cycle scans at most 1/GC_MAX_BUCKETS_DIV part of table */ |