block: bvec_nr_vecs() returns value for wrong slab
[platform/kernel/linux-exynos.git] / block / bio.c
index 194d28c..2e5d881 100644 (file)
@@ -156,7 +156,7 @@ out:
 
 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)