From 4aa30442c7d87261bb0b8295d0f1bfb1eacce513 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sun, 29 May 2011 22:18:07 -0400 Subject: [PATCH] Fix rcu_rbtree_prev Signed-off-by: Mathieu Desnoyers --- urcu-rbtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1