]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/scsi/scsi_sysfs.c
KVM: X86: Lower the default timer frequency limit to 200us
[mirror_ubuntu-bionic-kernel.git] / drivers / scsi / scsi_sysfs.c
index a9996c16f4ae63fc820065c75b68fb51c5a01ab4..26ce17178401b645bd9548e49dd11fecb3babf8c 100644 (file)
@@ -1415,7 +1415,10 @@ static void __scsi_remove_target(struct scsi_target *starget)
                 * check.
                 */
                if (sdev->channel != starget->channel ||
-                   sdev->id != starget->id ||
+                   sdev->id != starget->id)
+                       continue;
+               if (sdev->sdev_state == SDEV_DEL ||
+                   sdev->sdev_state == SDEV_CANCEL ||
                    !get_device(&sdev->sdev_gendev))
                        continue;
                spin_unlock_irqrestore(shost->host_lock, flags);