summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bcache/btree.c')
-rw-r--r--drivers/md/bcache/btree.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 89252e7f2879..6734e2759b93 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -23,6 +23,7 @@
#include "bcache.h"
#include "btree.h"
#include "debug.h"
+#include "extents.h"
#include "writeback.h"
#include <linux/slab.h>
@@ -931,6 +932,11 @@ out:
b->level = level;
b->parent = (void *) ~0UL;
+ if (!b->level)
+ b->ops = &bch_extent_keys_ops;
+ else
+ b->ops = &bch_btree_keys_ops;
+
mca_reinit(b);
return b;