Fix urcu test: incorrect handling of del/free
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 May 2013 15:15:49 +0000 (11:15 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 May 2013 15:15:49 +0000 (11:15 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_urcu_ja.c

index dc8b8adcc16578ad00cb863edcb7c499ec357bcd..ab23982033e87c646c3ddc0b986daaadf3f62a87 100644 (file)
@@ -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)++;
This page took 0.027393 seconds and 4 git commands to generate.