diff options
Diffstat (limited to 'lib/rbtree.c')
-rw-r--r-- | lib/rbtree.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/rbtree.c b/lib/rbtree.c index ba4a9d165f1b..d3ff682fd4b8 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c | |||
@@ -603,6 +603,16 @@ void rb_replace_node(struct rb_node *victim, struct rb_node *new, | |||
603 | } | 603 | } |
604 | EXPORT_SYMBOL(rb_replace_node); | 604 | EXPORT_SYMBOL(rb_replace_node); |
605 | 605 | ||
606 | void rb_replace_node_cached(struct rb_node *victim, struct rb_node *new, | ||
607 | struct rb_root_cached *root) | ||
608 | { | ||
609 | rb_replace_node(victim, new, &root->rb_root); | ||
610 | |||
611 | if (root->rb_leftmost == victim) | ||
612 | root->rb_leftmost = new; | ||
613 | } | ||
614 | EXPORT_SYMBOL(rb_replace_node_cached); | ||
615 | |||
606 | void rb_replace_node_rcu(struct rb_node *victim, struct rb_node *new, | 616 | void rb_replace_node_rcu(struct rb_node *victim, struct rb_node *new, |
607 | struct rb_root *root) | 617 | struct rb_root *root) |
608 | { | 618 | { |