From: Mathieu Desnoyers Date: Thu, 15 Sep 2011 10:29:31 +0000 (-0400) Subject: rculfhash: fix add_unique node counting X-Git-Tag: v0.7.0~43^2~148^2~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=17f31d1b07ffb59db8bad3ce2ae8f824ed820de0;p=urcu.git rculfhash: fix add_unique node counting Signed-off-by: Mathieu Desnoyers --- diff --git a/rculfhash.c b/rculfhash.c index 40f6ff5..824a940 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -1273,7 +1273,7 @@ struct cds_lfht_node *cds_lfht_add_unique(struct cds_lfht *ht, size = rcu_dereference(ht->t.size); ret = _cds_lfht_add(ht, size, node, 1, 0); - if (ret != node) + if (ret == node) ht_count_add(ht, size); return ret; }