|
@@ -1307,7 +1307,6 @@ static void scsi_sequential_lun_scan(struct scsi_target *starget,
|
|
static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
|
|
static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
|
|
enum scsi_scan_mode rescan)
|
|
enum scsi_scan_mode rescan)
|
|
{
|
|
{
|
|
- char devname[64];
|
|
|
|
unsigned char scsi_cmd[MAX_COMMAND_SIZE];
|
|
unsigned char scsi_cmd[MAX_COMMAND_SIZE];
|
|
unsigned int length;
|
|
unsigned int length;
|
|
u64 lun;
|
|
u64 lun;
|
|
@@ -1349,9 +1348,6 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- sprintf(devname, "host %d channel %d id %d",
|
|
|
|
- shost->host_no, sdev->channel, sdev->id);
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* Allocate enough to hold the header (the same size as one scsi_lun)
|
|
* Allocate enough to hold the header (the same size as one scsi_lun)
|
|
* plus the number of luns we are requesting. 511 was the default
|
|
* plus the number of luns we are requesting. 511 was the default
|
|
@@ -1470,12 +1466,12 @@ retry:
|
|
out_err:
|
|
out_err:
|
|
kfree(lun_data);
|
|
kfree(lun_data);
|
|
out:
|
|
out:
|
|
- scsi_device_put(sdev);
|
|
|
|
if (scsi_device_created(sdev))
|
|
if (scsi_device_created(sdev))
|
|
/*
|
|
/*
|
|
* the sdev we used didn't appear in the report luns scan
|
|
* the sdev we used didn't appear in the report luns scan
|
|
*/
|
|
*/
|
|
__scsi_remove_device(sdev);
|
|
__scsi_remove_device(sdev);
|
|
|
|
+ scsi_device_put(sdev);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|