From d2be3620f8040e68c0abdfb6ee9f11cc8b0961bc Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 30 Sep 2011 12:59:33 -0400 Subject: [PATCH] rculfhash: break resize loop on destroy Signed-off-by: Mathieu Desnoyers --- rculfhash.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rculfhash.c b/rculfhash.c index 8a9e097..fa2121c 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -1651,6 +1651,9 @@ void _do_cds_lfht_resize(struct cds_lfht *ht) * Resize table, re-do if the target size has changed under us. */ do { + assert(uatomic_read(&ht->in_progress_resize)); + if (CMM_LOAD_SHARED(ht->in_progress_destroy)) + break; ht->t.resize_initiated = 1; old_size = ht->t.size; new_size = CMM_LOAD_SHARED(ht->t.resize_target); -- 2.34.1