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:41:45 +0000 (06:41 +0100)
commite9dc8334d765f7910114921c63a0324272f1f636
treee31c39b4e85db8bf02a79019d78a1ba9f0a497e2
parent73f5176ecac265b03dcd8ef0aaed6950e5ecb828
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