summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/md/bcache/extents.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/bcache/extents.h b/drivers/md/bcache/extents.h
index e4bb64accc6b..9a7f312a555c 100644
--- a/drivers/md/bcache/extents.h
+++ b/drivers/md/bcache/extents.h
@@ -35,6 +35,7 @@ static inline unsigned bch_extent_ptrs(const struct bkey *k)
static inline void bch_set_extent_ptrs(struct bkey *k, unsigned i)
{
+ BUG_ON(i > BKEY_EXTENT_PTRS_MAX);
bch_set_val_u64s(k, i);
}