]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - block/bio.c
blk-mq: only attempt to merge bio if there is rq in sw queue
[mirror_ubuntu-bionic-kernel.git] / block / bio.c
index f411d634f62aef3c6e9e94ce1d09ff3bb6755069..66a7feb5414db13522c571ef67861d32d8975c4b 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)