diff options
Diffstat (limited to 'drivers/scsi/virtio_scsi.c')
-rw-r--r-- | drivers/scsi/virtio_scsi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 16bfd50cd3fe..db3b494e5926 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c | |||
@@ -750,8 +750,12 @@ static void __virtscsi_set_affinity(struct virtio_scsi *vscsi, bool affinity) | |||
750 | 750 | ||
751 | vscsi->affinity_hint_set = true; | 751 | vscsi->affinity_hint_set = true; |
752 | } else { | 752 | } else { |
753 | for (i = 0; i < vscsi->num_queues; i++) | 753 | for (i = 0; i < vscsi->num_queues; i++) { |
754 | if (!vscsi->req_vqs[i].vq) | ||
755 | continue; | ||
756 | |||
754 | virtqueue_set_affinity(vscsi->req_vqs[i].vq, -1); | 757 | virtqueue_set_affinity(vscsi->req_vqs[i].vq, -1); |
758 | } | ||
755 | 759 | ||
756 | vscsi->affinity_hint_set = false; | 760 | vscsi->affinity_hint_set = false; |
757 | } | 761 | } |