X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fbio.c;h=8000e2fa16cb21a12f8288b3f0b7eeb8d88ab042;hb=01135d92c1a540cd3370f7cf3d1c762320b85034;hp=25f1af0d81e5bee47ee8487b27ca8e0152b6d156;hpb=2ab61b01110aa04cd853c619a74881e3225a5e24;p=linux-2.6-omap-h63xx.git diff --git a/fs/bio.c b/fs/bio.c index 25f1af0d81e..8000e2fa16c 100644 --- a/fs/bio.c +++ b/fs/bio.c @@ -77,11 +77,8 @@ struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx, struct */ bvl = mempool_alloc(bs->bvec_pools[*idx], gfp_mask); - if (bvl) { - struct biovec_slab *bp = bvec_slabs + *idx; - - memset(bvl, 0, bp->nr_vecs * sizeof(struct bio_vec)); - } + if (bvl) + memset(bvl, 0, bvec_nr_vecs(*idx) * sizeof(struct bio_vec)); return bvl; } @@ -149,7 +146,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) goto out; } bio->bi_flags |= idx << BIO_POOL_OFFSET; - bio->bi_max_vecs = bvec_slabs[idx].nr_vecs; + bio->bi_max_vecs = bvec_nr_vecs(idx); } bio->bi_io_vec = bvl; }