From b9e36678a644361b1043b2f20e023d6434377fb4 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 10 Sep 2011 18:14:59 -0700 Subject: [PATCH] rculfhash: fix fini_table for size 1 Signed-off-by: Mathieu Desnoyers --- rculfhash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rculfhash.c b/rculfhash.c index f6c901b..003ab0b 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -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 = -- 2.34.1