summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-01-12 03:50:45 -0900
committerKent Overstreet <kent.overstreet@gmail.com>2017-01-18 21:41:35 -0900
commit39e3561dd616daaed5e4e0cc29c9a52fd36f1614 (patch)
tree34e01de6582d0f2068ab990748444aea35304f19
parente97e1d82a6bf1382ccd2786c7c4bd233ee1c4299 (diff)
bcache: add an assertion
-rw-r--r--drivers/md/bcache/util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/bcache/util.c b/drivers/md/bcache/util.c
index c6a4ef5adbb5..1d21223a5f0e 100644
--- a/drivers/md/bcache/util.c
+++ b/drivers/md/bcache/util.c
@@ -364,6 +364,7 @@ void bch_bio_map(struct bio *bio, void *base)
bv->bv_offset = 0;
start: bv->bv_len = min_t(size_t, PAGE_SIZE - bv->bv_offset,
size);
+ BUG_ON(bio->bi_vcnt >= bio->bi_max_vecs);
if (base) {
bv->bv_page = is_vmalloc_addr(base)
? vmalloc_to_page(base)