aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rbtree.c
diff options
context:
space:
mode:
authorRoss Zwisler <ross.zwisler@linux.intel.com>2018-02-03 00:26:10 -0700
committerRoss Zwisler <ross.zwisler@linux.intel.com>2018-02-03 00:26:10 -0700
commitd121f07691415df824e6b60520f782f6d13b3c81 (patch)
tree422ad3cc6fd631604fef4e469e49bacba8202e52 /lib/rbtree.c
parentlibnvdimm, namespace: remove redundant initialization of 'nd_mapping' (diff)
parentdax: require 'struct page' by default for filesystem dax (diff)
downloadlinux-dev-d121f07691415df824e6b60520f782f6d13b3c81.tar.xz
linux-dev-d121f07691415df824e6b60520f782f6d13b3c81.zip
Merge branch 'for-4.16/dax' into libnvdimm-for-next
Diffstat (limited to 'lib/rbtree.c')
-rw-r--r--lib/rbtree.c10
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,
}
EXPORT_SYMBOL(rb_replace_node);
+void rb_replace_node_cached(struct rb_node *victim, struct rb_node *new,
+ struct rb_root_cached *root)
+{
+ rb_replace_node(victim, new, &root->rb_root);
+
+ if (root->rb_leftmost == victim)
+ root->rb_leftmost = new;
+}
+EXPORT_SYMBOL(rb_replace_node_cached);
+
void rb_replace_node_rcu(struct rb_node *victim, struct rb_node *new,
struct rb_root *root)
{