rculfhash: Fix off-by-one in fini_table
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 11 Sep 2011 01:11:56 +0000 (18:11 -0700)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 11 Sep 2011 01:11:56 +0000 (18:11 -0700)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c

index 4b781f7b9012273b24dfb93e99afa0d664032daf..f6c901bb0d4f242ecfa5b8bce0077313bee56f54 100644 (file)
@@ -890,8 +890,12 @@ void fini_table(struct cds_lfht *ht, struct rcu_table *t,
 
                len = !i ? 1 : 1UL << (i - 1);
                dbg_printf("fini order %lu len: %lu\n", i, len);
-               /* Update table size */
-               t->size = 1UL << (i - 1);
+               /*
+                * Update table size. Need to shrink this table prior to
+                * removal so gc lookups use non-logically-removed dummy
+                * nodes.
+                */
+               t->size = 1UL << (i - 2);
                /* Unlink */
                for (j = 0; j < len; j++) {
                        struct cds_lfht_node *fini_node =
This page took 0.026287 seconds and 4 git commands to generate.