]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - net/netfilter/ipset/ip_set_bitmap_port.c
netfilter: ipset: references are protected by rwlock instead of mutex
[linux-2.6.git] / net / netfilter / ipset / ip_set_bitmap_port.c
index 165f09b1a9cb22cad3f3db40f2a13ed905eefd9c..6b38eb8f6ed823fc42ca7d0443349b506b8623f3 100644 (file)
@@ -320,8 +320,7 @@ bitmap_port_head(struct ip_set *set, struct sk_buff *skb)
                goto nla_put_failure;
        NLA_PUT_NET16(skb, IPSET_ATTR_PORT, htons(map->first_port));
        NLA_PUT_NET16(skb, IPSET_ATTR_PORT_TO, htons(map->last_port));
-       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES,
-                     htonl(atomic_read(&set->ref) - 1));
+       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1));
        NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE,
                      htonl(sizeof(*map) + map->memsize));
        if (with_timeout(map->timeout))