rculfhash: fix fini_table for size 1
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 11 Sep 2011 01:14:59 +0000 (18:14 -0700)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 11 Sep 2011 01:14:59 +0000 (18:14 -0700)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c

index f6c901bb0d4f242ecfa5b8bce0077313bee56f54..003ab0bd0236d39ee4c591c2dccec6a3266bfca9 100644 (file)
@@ -895,7 +895,7 @@ void fini_table(struct cds_lfht *ht, struct rcu_table *t,
                 * removal so gc lookups use non-logically-removed dummy
                 * nodes.
                 */
-               t->size = 1UL << (i - 2);
+               t->size = (i == 1) ? 0 : 1UL << (i - 2);
                /* Unlink */
                for (j = 0; j < len; j++) {
                        struct cds_lfht_node *fini_node =
This page took 0.025958 seconds and 4 git commands to generate.