scsi: use 'scsi_device_from_queue()' for scsi_dh
authorHannes Reinecke <hare@suse.de>
Fri, 17 Feb 2017 08:02:45 +0000 (09:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Mar 2017 05:37:26 +0000 (06:37 +0100)
commit33950b56d2c20d10e85a0ab339e5368e8d029a2b
tree13d3011e452a4e5cdaeb749a9109352937ce38d0
parent2dc9a859eb8918ff86efdd0f2a570bcb3d9d6973
scsi: use 'scsi_device_from_queue()' for scsi_dh

commit 857de6e00778738dc3d61f75acbac35bdc48e533 upstream.

The device handler needs to check if a given queue belongs to a scsi
device; only then does it make sense to attach a device handler.

[mkp: dropped flags]

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/scsi_dh.c
drivers/scsi/scsi_lib.c
include/scsi/scsi_device.h