diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-12-23 12:46:21 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-12-29 08:29:53 +0100 |
commit | d3f761104b097738932afcc310fbbbbfb007ef92 (patch) | |
tree | 5acda986824cab2a8c54690258a49df61b898389 /fs/bio.c | |
parent | f735b5eeb9fcbb001e0cf2a5296b19c4bbaec55f (diff) | |
download | op-kernel-dev-d3f761104b097738932afcc310fbbbbfb007ef92.zip op-kernel-dev-d3f761104b097738932afcc310fbbbbfb007ef92.tar.gz |
bio: get rid of bio_vec clearing
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>
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -180,7 +180,7 @@ struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx, * 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! @@ -237,9 +237,6 @@ fallback: } } - if (bvl) - memset(bvl, 0, bvec_nr_vecs(*idx) * sizeof(struct bio_vec)); - return bvl; } @@ -325,7 +322,6 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) 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); |