+static void +fc_rport_terminate(struct fc_rport *rport) +{ + struct Scsi_Host *shost = rport_to_shost(rport); + struct device *dev = &rport->dev; + unsigned long flags; + + if (rport->starget) { + scsi_forget_target(rport->starget); + __scsi_remove_target(rport->starget); + } + + transport_remove_device(dev); + device_del(dev); + transport_destroy_device(dev); + spin_lock_irqsave(shost->host_lock, flags); + list_del(&rport->peers); + spin_unlock_irqrestore(shost->host_lock, flags); + put_device(&shost->shost_gendev); + + kfree(rport); }

Do you want to free the memory in the struct device's release
function like the scsi_device's release function? If userspace
has a sysfs file open and is reading or writing to it at the
same time you free the memory here, will fun things happen?

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to