[SCSI] fc transport: bug fix: correct references
authorJames Smart <James.Smart@Emulex.Com>
Mon, 26 Jun 2006 18:19:59 +0000 (14:19 -0400)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Tue, 27 Jun 2006 16:01:46 +0000 (11:01 -0500)
commit3bdad7bd253f17ead00b4af2e82f84e9522c95ac
tree2f25e9ec91e76a19ceb939552ef21ee9713fb4b5
parent1c9e16e47a22c61d99aabb1c154e5106ddbf3575
[SCSI] fc transport: bug fix: correct references

Original post was incorrect as it didn't realize that we already had
a self-referenc due to device_initialize(), and we were really only
missing the put on our own reference. This was hidden by the other bug
which had the midlayer reusing stargets after they were already free,
which was doing too many puts on our rport.

Updating FC transport for:
- Add put in fc_rport_final_delete(), to release the rport.
  Prior, we were leaving the rport with a reference, thus the shost
  with references, etc. If the driver was unloaded, shosts and rports
  remained, along with work threads, etc
- Fix fc_rport_create failure path - too many put's on parent
- Add commenting to easily track ref taking.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_transport_fc.c