netfilter: conntrack: convert to refcount_t api
[platform/kernel/linux-rpi.git] / net / netfilter / nf_conntrack_netlink.c
index 1c02be0..ef0a78a 100644 (file)
@@ -508,7 +508,7 @@ nla_put_failure:
 
 static int ctnetlink_dump_use(struct sk_buff *skb, const struct nf_conn *ct)
 {
-       if (nla_put_be32(skb, CTA_USE, htonl(atomic_read(&ct->ct_general.use))))
+       if (nla_put_be32(skb, CTA_USE, htonl(refcount_read(&ct->ct_general.use))))
                goto nla_put_failure;
        return 0;
 
@@ -1200,7 +1200,7 @@ restart:
                        ct = nf_ct_tuplehash_to_ctrack(h);
                        if (nf_ct_is_expired(ct)) {
                                if (i < ARRAY_SIZE(nf_ct_evict) &&
-                                   atomic_inc_not_zero(&ct->ct_general.use))
+                                   refcount_inc_not_zero(&ct->ct_general.use))
                                        nf_ct_evict[i++] = ct;
                                continue;
                        }
@@ -1748,7 +1748,7 @@ restart:
                                                  NFNL_MSG_TYPE(cb->nlh->nlmsg_type),
                                                  ct, dying ? true : false, 0);
                        if (res < 0) {
-                               if (!atomic_inc_not_zero(&ct->ct_general.use))
+                               if (!refcount_inc_not_zero(&ct->ct_general.use))
                                        continue;
                                cb->args[0] = cpu;
                                cb->args[1] = (unsigned long)ct;