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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Feb 2017 23:41:42 +0000 (18:41 -0500)
commit857de6e00778738dc3d61f75acbac35bdc48e533
tree6c50408c15f9326270e4680636b3e8fa6379000b
parentf22aaec97d889f3fbf89b185309bdc98b8202eda
scsi: use 'scsi_device_from_queue()' for scsi_dh

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]

Cc: <stable@vger.kernel.org>
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>
drivers/scsi/scsi_dh.c
drivers/scsi/scsi_lib.c
include/scsi/scsi_device.h