diff options
author | Hannes Reinecke <hare@suse.de> | 2017-02-17 09:02:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-12 06:37:26 +0100 |
commit | 33950b56d2c20d10e85a0ab339e5368e8d029a2b (patch) | |
tree | 13d3011e452a4e5cdaeb749a9109352937ce38d0 /include | |
parent | 2dc9a859eb8918ff86efdd0f2a570bcb3d9d6973 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi_device.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 4f6ba34cdee6..293b9a7f53bc 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -307,6 +307,7 @@ extern void scsi_remove_device(struct scsi_device *); extern int scsi_unregister_device_handler(struct scsi_device_handler *scsi_dh); void scsi_attach_vpd(struct scsi_device *sdev); +extern struct scsi_device *scsi_device_from_queue(struct request_queue *q); extern int scsi_device_get(struct scsi_device *); extern void scsi_device_put(struct scsi_device *); extern struct scsi_device *scsi_device_lookup(struct Scsi_Host *, |