| Submitter | Dan Williams |
|---|---|
| Date | May 20, 2012, 7:20 p.m. |
| Message ID | <CAA9_cmeL5h_5xESis06pyT-7bt+K2eQrN5SR6_b25qLBSDVXvA@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/160282/ |
| State | Not Applicable |
| Delegated to: | David Miller |
| Headers | show |
Comments
Patch
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 01b0374..8906557 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1714,6 +1714,9 @@ static void scsi_sysfs_add_devices(struct Scsi_Host *shost) { struct scsi_device *sdev; shost_for_each_device(sdev, shost) { + /* target removed before the device could be added */ + if (sdev->sdev_state == SDEV_DEL) + continue; if (!scsi_host_scan_allowed(shost) || scsi_sysfs_add_sdev(sdev) != 0)