We don't need to clear the memory used for adding bio_vec entries,
since nobody should be looking at members unitialized. Any valid
use should be below bio->bi_vcnt, and that members up until that count
must be valid since they were added through bio_add_page().
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* kzalloc() for the exact number of vecs right away.
*/
if (!bs)
- bvl = kzalloc(nr * sizeof(struct bio_vec), gfp_mask);
+ bvl = kmalloc(nr * sizeof(struct bio_vec), gfp_mask);
/*
* see comment near bvec_array define!
}
}
- if (bvl)
- memset(bvl, 0, bvec_nr_vecs(*idx) * sizeof(struct bio_vec));
-
return bvl;
}
idx = 0;
bvl = bio->bi_inline_vecs;
nr_iovecs = BIO_INLINE_VECS;
- memset(bvl, 0, BIO_INLINE_VECS * sizeof(*bvl));
} else {
bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx,
bs);