From: Mathieu Desnoyers Date: Thu, 23 May 2013 15:15:49 +0000 (-0400) Subject: Fix urcu test: incorrect handling of del/free X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d7069878f7d6a1265bf18148f2fafa706312cc2e;p=userspace-rcu.git Fix urcu test: incorrect handling of del/free Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_ja.c b/tests/test_urcu_ja.c index dc8b8ad..ab23982 100644 --- a/tests/test_urcu_ja.c +++ b/tests/test_urcu_ja.c @@ -681,11 +681,11 @@ void *test_ja_rw_thr_writer(void *_count) node = cds_hlist_first_entry_rcu(&head, struct ja_test_node, node.list); if (node) { ret = cds_ja_del(test_ja, key, &node->node); - if (ret) { + if (!ret) { call_rcu(&node->node.head, free_node_cb); - URCU_TLS(nr_delnoent)++; - } else { URCU_TLS(nr_del)++; + } else { + URCU_TLS(nr_delnoent)++; } } else { URCU_TLS(nr_delnoent)++;