summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/btree.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bcache/btree.h')
-rw-r--r--drivers/md/bcache/btree.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/md/bcache/btree.h b/drivers/md/bcache/btree.h
index d4b705e..e11bb85 100644
--- a/drivers/md/bcache/btree.h
+++ b/drivers/md/bcache/btree.h
@@ -204,11 +204,6 @@ static inline void set_gc_sectors(struct cache_set *c)
atomic_set(&c->sectors_to_gc, c->sb.bucket_size * c->nbuckets / 8);
}
-static inline bool bch_ptr_invalid(struct btree *b, const struct bkey *k)
-{
- return __bch_ptr_invalid(b->c, b->level, k);
-}
-
static inline struct bkey *bch_btree_iter_init(struct btree *b,
struct btree_iter *iter,
struct bkey *search)
@@ -216,6 +211,14 @@ static inline struct bkey *bch_btree_iter_init(struct btree *b,
return __bch_btree_iter_init(b, iter, search, b->sets);
}
+static inline bool bch_ptr_invalid(struct btree *b, const struct bkey *k)
+{
+ if (b->level)
+ return bch_btree_ptr_invalid(b->c, k);
+ else
+ return bch_extent_ptr_invalid(b->c, k);
+}
+
void bkey_put(struct cache_set *c, struct bkey *k);
/* Looping macros */
OpenPOWER on IntegriCloud