Fix dummy node insertion bug
[urcu.git] / rculfhash.c
index 6e07878a1c3db3c2afac4700727491a2aa8be3ea..a736b868ae7dac21c1d4d60d561cfcfbb1d223e9 100644 (file)
@@ -887,6 +887,9 @@ struct cds_lfht_node *_cds_lfht_add(struct cds_lfht *ht,
                                goto insert;
                        if (likely(clear_flag(iter)->p.reverse_hash > node->p.reverse_hash))
                                goto insert;
+                       /* dummy node is the first node of the identical-hash-value chain */
+                       if (dummy && clear_flag(iter)->p.reverse_hash == node->p.reverse_hash)
+                               goto insert;
                        next = rcu_dereference(clear_flag(iter)->p.next);
                        if (unlikely(is_removed(next)))
                                goto gc_node;
This page took 0.025814 seconds and 4 git commands to generate.