Re: [Xen-devel] [PATCH RFC 10/12] xen-blkback: make the queueof free requests per backend

From: Jan Beulich
Date: Thu Feb 28 2013 - 06:08:57 EST


>>> On 28.02.13 at 11:28, Roger Pau Monne <roger.pau@xxxxxxxxxx> wrote:
> @@ -122,6 +125,19 @@ static struct xen_blkif *xen_blkif_alloc(domid_t domid)
> spin_lock_init(&blkif->free_pages_lock);
> INIT_LIST_HEAD(&blkif->free_pages);
> blkif->free_pages_num = 0;
> + blkif->pending_reqs = kzalloc(sizeof(blkif->pending_reqs[0]) *
> + xen_blkif_reqs, GFP_KERNEL);

kcalloc() is preferred in cases like this, I believe.

Jan

--
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/