netfilter: conntrack: convert to refcount_t api
[platform/kernel/linux-rpi.git] / net / netfilter / nft_ct.c
index 54ecb9f..ee69c69 100644 (file)
@@ -259,7 +259,7 @@ static void nft_ct_set_zone_eval(const struct nft_expr *expr,
 
        ct = this_cpu_read(nft_ct_pcpu_template);
 
-       if (likely(atomic_read(&ct->ct_general.use) == 1)) {
+       if (likely(refcount_read(&ct->ct_general.use) == 1)) {
                nf_ct_zone_add(ct, &zone);
        } else {
                /* previous skb got queued to userspace */
@@ -270,7 +270,6 @@ static void nft_ct_set_zone_eval(const struct nft_expr *expr,
                }
        }
 
-       atomic_inc(&ct->ct_general.use);
        nf_ct_set(skb, ct, IP_CT_NEW);
 }
 #endif
@@ -375,7 +374,6 @@ static bool nft_ct_tmpl_alloc_pcpu(void)
                        return false;
                }
 
-               atomic_set(&tmp->ct_general.use, 1);
                per_cpu(nft_ct_pcpu_template, cpu) = tmp;
        }