diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-12 03:50:45 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-18 21:41:35 -0900 |
commit | 39e3561dd616daaed5e4e0cc29c9a52fd36f1614 (patch) | |
tree | 34e01de6582d0f2068ab990748444aea35304f19 | |
parent | e97e1d82a6bf1382ccd2786c7c4bd233ee1c4299 (diff) |
bcache: add an assertion
-rw-r--r-- | drivers/md/bcache/util.c | 1 |
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) |