diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index f3feb245c..3230087ca 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1588,7 +1588,9 @@ static int __scst_local_add_adapter(struct scst_local_tgt *tgt, if (!locked) mutex_unlock(&scst_local_mutex); - scsi_scan_target(&sess->shost->shost_gendev, 0, 0, SCAN_WILD_CARD, 1); + if (scst_initiator_has_luns(tgt->scst_tgt, initiator_name)) + scsi_scan_target(&sess->shost->shost_gendev, 0, 0, + SCAN_WILD_CARD, 1); out: TRACE_EXIT_RES(res);