diff options
-rw-r--r-- | contrib/vhost-user-scsi/vhost-user-scsi.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c index dd0de1f..0573ae7 100644 --- a/contrib/vhost-user-scsi/vhost-user-scsi.c +++ b/contrib/vhost-user-scsi/vhost-user-scsi.c @@ -257,6 +257,7 @@ static int iscsi_add_lun(iscsi_lun_t *lun, char *iscsi_uri) assert(lun); assert(iscsi_uri); + assert(!lun->iscsi_ctx); iscsi_ctx = iscsi_create_context(VUS_ISCSI_INITIATOR); if (!iscsi_ctx) { @@ -663,11 +664,6 @@ static int vdev_scsi_add_iscsi_lun(vhost_scsi_dev_t *vdev_scsi, assert(iscsi_uri); assert(lun < VUS_MAX_LUNS); - if (vdev_scsi->luns[lun].iscsi_ctx) { - PERR("Lun %d already configured", lun); - return -1; - } - if (iscsi_add_lun(&vdev_scsi->luns[lun], iscsi_uri) != 0) { return -1; } |