rculfhash: break resize loop on destroy
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 30 Sep 2011 16:59:33 +0000 (12:59 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 30 Sep 2011 16:59:33 +0000 (12:59 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c

index 8a9e0974926d7ce3973f40b92fb629eebc58e0f2..fa2121c9820edaa010856bf96a675a9cd6eace2e 100644 (file)
@@ -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);
This page took 0.026823 seconds and 4 git commands to generate.