]> Pileus Git - ~andy/linux/blobdiff - net/netfilter/x_tables.c
netfilter: get rid of atomic ops in fast path
[~andy/linux] / net / netfilter / x_tables.c
index a9adf4c6b299ee35a72c4617e0d3e565031de940..52959efca858318ccfc2dcdf26d02e47b7956d60 100644 (file)
@@ -762,8 +762,8 @@ void xt_compat_unlock(u_int8_t af)
 EXPORT_SYMBOL_GPL(xt_compat_unlock);
 #endif
 
-DEFINE_PER_CPU(struct xt_info_lock, xt_info_locks);
-EXPORT_PER_CPU_SYMBOL_GPL(xt_info_locks);
+DEFINE_PER_CPU(seqcount_t, xt_recseq);
+EXPORT_PER_CPU_SYMBOL_GPL(xt_recseq);
 
 static int xt_jumpstack_alloc(struct xt_table_info *i)
 {
@@ -1362,10 +1362,7 @@ static int __init xt_init(void)
        int rv;
 
        for_each_possible_cpu(i) {
-               struct xt_info_lock *lock = &per_cpu(xt_info_locks, i);
-
-               seqlock_init(&lock->lock);
-               lock->readers = 0;
+               seqcount_init(&per_cpu(xt_recseq, i));
        }
 
        xt = kmalloc(sizeof(struct xt_af) * NFPROTO_NUMPROTO, GFP_KERNEL);