diff mbox

[Bug,111441] New: iscsi fails to attach to targets

Message ID 56AB2207.3060607@cs.wisc.edu (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Mike Christie Jan. 29, 2016, 8:25 a.m. UTC
On 01/29/2016 02:01 AM, Michael Christie wrote:
> Can you send me your lio config?
> 

Not sure what I was thinking. Don't send me anything. Could you just try
the attached patch?
diff mbox

Patch

diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 21930c9..4269cbc 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -1061,6 +1061,7 @@  int scsi_sysfs_add_sdev(struct scsi_device *sdev)
 	if (error) {
 		sdev_printk(KERN_INFO, sdev,
 				"failed to add device handler: %d\n", error);
+		device_del(&sdev->sdev_gendev);
 		return error;
 	}