]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[SCSI] Skip deleted devices in __scsi_device_lookup_by_target()
authorHannes Reinecke <hare@suse.de>
Tue, 13 Jan 2009 15:50:37 +0000 (16:50 +0100)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 13 Jan 2009 16:48:11 +0000 (10:48 -0600)
commit32aeef605aa01e1fee45e052eceffb00e72ba2b0
tree7ad435682378ff585b1205a5a9ce5d6124c8284a
parentdebf47779efd6eace440c884c8cca2665d966eb4
[SCSI] Skip deleted devices in __scsi_device_lookup_by_target()

__scsi_device_lookup_by_target() will always return
the first sdev with a matching LUN, regardless of
the state. However, when this sdev is in SDEV_DEL
scsi_device_lookup_by_target() will ignore this
device and so any valid device on the list after
the deleted device will never be found.
So we have to modify __scsi_device_lookup_by_target()
to skip any device in SDEV_DEL.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi.c