Fix rcuja: delete last node
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 May 2013 00:46:47 +0000 (20:46 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 May 2013 00:46:47 +0000 (20:46 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rcuja/rcuja.c

index 67964b65da65bb4abee4db5b9379f270bda06f47..7402cf31f21119b26145bd7d90d0f11bc4b34637 100644 (file)
@@ -1015,7 +1015,7 @@ int ja_attach_node(struct cds_ja *ja,
 
        if (node_flag_ptr && ja_node_ptr(*node_flag_ptr) != NULL) {
                /*
-                * Attach point is non-NULL: it has been updated between
+                * Target node is non-NULL: it has been updated between
                 * RCU lookup and lock acquisition. We need to re-try
                 * lookup and attach.
                 */
@@ -1243,7 +1243,7 @@ int ja_detach_node(struct cds_ja *ja,
                }
                assert(shadow_node->nr_child > 0);
                shadow_nodes[nr_shadow++] = shadow_node;
-               if (shadow_node->nr_child == 1)
+               if (shadow_node->nr_child == 1 && i > 1)
                        nr_clear++;
                nr_branch++;
                if (shadow_node->nr_child > 1 || i == 1) {
This page took 0.029402 seconds and 4 git commands to generate.