From 4d61fee19e819a8c169c438d0cda9a20db63ffbf Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Wed, 11 Oct 2006 01:22:24 -0700 Subject: [PATCH] --- yaml --- r: 39374 b: refs/heads/master c: bf02c082bf7a464518d45b9c178b8aa83f74dd5d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/bio.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 7c2868407744..1c9af384428c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 49a6cbe1cd8a72451d9d6ab5b1e163f17c1bbee3 +refs/heads/master: bf02c082bf7a464518d45b9c178b8aa83f74dd5d diff --git a/trunk/fs/bio.c b/trunk/fs/bio.c index 8f93e939f213..f95c8749499f 100644 --- a/trunk/fs/bio.c +++ b/trunk/fs/bio.c @@ -79,7 +79,6 @@ static struct bio_set *fs_bio_set; static inline struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx, struct bio_set *bs) { struct bio_vec *bvl; - struct biovec_slab *bp; /* * see comment near bvec_array define! @@ -98,10 +97,12 @@ static inline struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned lon * idx now points to the pool we want to allocate from */ - bp = bvec_slabs + *idx; bvl = mempool_alloc(bs->bvec_pools[*idx], gfp_mask); - if (bvl) + if (bvl) { + struct biovec_slab *bp = bvec_slabs + *idx; + memset(bvl, 0, bp->nr_vecs * sizeof(struct bio_vec)); + } return bvl; } @@ -166,7 +167,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) bio_init(bio); if (likely(nr_iovecs)) { - unsigned long idx; + unsigned long idx = 0; /* shut up gcc */ bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs); if (unlikely(!bvl)) {