X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=rculfhash.c;h=003ab0bd0236d39ee4c591c2dccec6a3266bfca9;hb=b9e36678a644361b1043b2f20e023d6434377fb4;hp=4b781f7b9012273b24dfb93e99afa0d664032daf;hpb=c90201ac0cbb9b552a2618eaa00de1f80d4248f1;p=urcu.git diff --git a/rculfhash.c b/rculfhash.c index 4b781f7..003ab0b 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -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 = (i == 1) ? 0 : 1UL << (i - 2); /* Unlink */ for (j = 0; j < len; j++) { struct cds_lfht_node *fini_node =