Re: [PATCH] bio: make use of bvec_nr_vecs

From: rae l
Date: Sat Jul 26 2008 - 00:24:32 EST


On Sat, Jul 26, 2008 at 2:11 AM, Denis ChengRq <crquan@xxxxxxxxx> wrote:
> 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));
and if we have a mempool_zalloc, this can be more simplified,

there was no mempool_zalloc yet, should we create it inlined with
__GFP_ZERO, for this and further use?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/