Mike Christie 3ed7897242 [SCSI] scsi_host regression: fix scsi host leak
commit 9c7701088a61cc0cf8a6e1c68d1e74e3cc2ee0b7
Author: Dave Young <hidave.darkstar@gmail.com>
Date:   Tue Jan 22 14:01:34 2008 +0800

    scsi: use class iteration api

Isn't a correct replacement for the original hand rolled host
lookup. The problem is that class_find_child would get a reference to
the host's class device which is never released.  Since the host class
device holds a reference to the host gendev, the host can never be
freed.

In 2.6.26 we started using class_find_device, and this function also
gets a reference to the device, so we end up with an extra ref
and the host will not get released.

This patch adds a put_device to balance the class_find_device() get. I
kept the scsi_host_get in scsi_host_lookup, because the target layer
is using scsi_host_lookup and it looks like it needs the SHOST_DEL
check.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-15 11:09:43 -05:00
..
2008-06-05 08:36:37 -07:00
2008-05-20 14:52:25 -07:00
2008-06-06 11:31:02 -07:00
2008-05-24 09:56:11 -07:00
2008-05-20 16:44:43 +02:00
2008-05-20 13:31:54 -07:00
2008-05-20 13:31:55 -07:00
2008-05-21 16:56:00 -07:00
2008-06-05 16:14:17 -07:00
2008-05-20 13:31:55 -07:00
2008-06-06 11:29:12 -07:00
2008-05-30 15:09:46 +10:00