Skip to content
Commit 32aeef60 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by James Bottomley
Browse files

[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: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent debf4777
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment