From: Mathieu Desnoyers Date: Mon, 30 May 2011 02:18:07 +0000 (-0400) Subject: Fix rcu_rbtree_prev X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4aa30442c7d87261bb0b8295d0f1bfb1eacce513;p=userspace-rcu.git Fix rcu_rbtree_prev Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu-rbtree.c b/urcu-rbtree.c index de2f911..37ecfd2 100644 --- a/urcu-rbtree.c +++ b/urcu-rbtree.c @@ -326,7 +326,7 @@ struct rcu_rbtree_node *rcu_rbtree_prev(struct rcu_rbtree *rbtree, x = rcu_dereference(x); if (!rcu_rbtree_is_nil(xl = rcu_dereference(x->left))) - return rcu_rbtree_min(rbtree, xl); + return rcu_rbtree_max(rbtree, xl); y = get_parent_and_pos(x, &x_pos); while (!rcu_rbtree_is_nil(y) && x_pos == IS_LEFT) { x = y;