diff --git a/block/bio.c b/block/bio.c index b832151cd0bf..04969b392c72 100644 --- a/block/bio.c +++ b/block/bio.c @@ -158,7 +158,7 @@ static void bio_put_slab(struct bio_set *bs) unsigned int bvec_nr_vecs(unsigned short idx) { - return bvec_slabs[idx].nr_vecs; + return bvec_slabs[--idx].nr_vecs; } void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned int idx)