diff options
author | David S. Miller | 2019-04-17 20:26:25 +0200 |
---|---|---|
committer | David S. Miller | 2019-04-17 20:26:25 +0200 |
commit | 6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b (patch) | |
tree | 0a7976054052e793da782c2b7ec34eccfbf66449 /drivers/block | |
parent | Merge branch 's390-next' (diff) | |
parent | Merge tag 'for-linus-5.1-2' of git://github.com/cminyard/linux-ipmi (diff) | |
download | kernel-qcow2-linux-6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b.tar.gz kernel-qcow2-linux-6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b.tar.xz kernel-qcow2-linux-6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflict resolution of af_smc.c from Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/virtio_blk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 4bc083b7c9b5..2a7ca4a1e6f7 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -513,6 +513,8 @@ static int init_vq(struct virtio_blk *vblk) if (err) num_vqs = 1; + num_vqs = min_t(unsigned int, nr_cpu_ids, num_vqs); + vblk->vqs = kmalloc_array(num_vqs, sizeof(*vblk->vqs), GFP_KERNEL); if (!vblk->vqs) return -ENOMEM; |