aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bio.c')
-rw-r--r--fs/bio.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 75e6be18ecd3..711cee103602 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -180,7 +180,7 @@ struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx,
180 * kzalloc() for the exact number of vecs right away. 180 * kzalloc() for the exact number of vecs right away.
181 */ 181 */
182 if (!bs) 182 if (!bs)
183 bvl = kzalloc(nr * sizeof(struct bio_vec), gfp_mask); 183 bvl = kmalloc(nr * sizeof(struct bio_vec), gfp_mask);
184 184
185 /* 185 /*
186 * see comment near bvec_array define! 186 * see comment near bvec_array define!
@@ -237,9 +237,6 @@ fallback:
237 } 237 }
238 } 238 }
239 239
240 if (bvl)
241 memset(bvl, 0, bvec_nr_vecs(*idx) * sizeof(struct bio_vec));
242
243 return bvl; 240 return bvl;
244} 241}
245 242
@@ -325,7 +322,6 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
325 idx = 0; 322 idx = 0;
326 bvl = bio->bi_inline_vecs; 323 bvl = bio->bi_inline_vecs;
327 nr_iovecs = BIO_INLINE_VECS; 324 nr_iovecs = BIO_INLINE_VECS;
328 memset(bvl, 0, BIO_INLINE_VECS * sizeof(*bvl));
329 } else { 325 } else {
330 bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, 326 bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx,
331 bs); 327 bs);