diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbtree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rbtree.c b/lib/rbtree.c index 4b4b29b4577d..e2aa3be29858 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c | |||
@@ -250,15 +250,15 @@ void rb_erase(struct rb_node *node, struct rb_root *root) | |||
250 | if (child) | 250 | if (child) |
251 | rb_set_parent(child, parent); | 251 | rb_set_parent(child, parent); |
252 | parent->rb_left = child; | 252 | parent->rb_left = child; |
253 | |||
254 | node->rb_right = old->rb_right; | ||
255 | rb_set_parent(old->rb_right, node); | ||
253 | } | 256 | } |
254 | 257 | ||
255 | node->rb_parent_color = old->rb_parent_color; | 258 | node->rb_parent_color = old->rb_parent_color; |
256 | node->rb_right = old->rb_right; | ||
257 | node->rb_left = old->rb_left; | 259 | node->rb_left = old->rb_left; |
258 | |||
259 | rb_set_parent(old->rb_left, node); | 260 | rb_set_parent(old->rb_left, node); |
260 | if (old->rb_right) | 261 | |
261 | rb_set_parent(old->rb_right, node); | ||
262 | goto color; | 262 | goto color; |
263 | } | 263 | } |
264 | 264 | ||