提交 710105fd 编写于 作者: H Hannes Reinecke 提交者: James Bottomley

scsi_dh: return SCSI_DH_NOTCONN in scsi_dh_activate()

When calling scsi_dh_activate() we should be returning
SCSI_DH_NOTCONN if the device handler couldn't be attached.
Reviewed-by: NBart van Assche <bart.vanassche@sandisk.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NHannes Reinecke <hare@suse.de>
Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
上级 d4422774
...@@ -326,6 +326,7 @@ int scsi_dh_activate(struct request_queue *q, activate_complete fn, void *data) ...@@ -326,6 +326,7 @@ int scsi_dh_activate(struct request_queue *q, activate_complete fn, void *data)
if (!sdev->handler) if (!sdev->handler)
goto out_fn; goto out_fn;
err = SCSI_DH_NOTCONN;
if (sdev->sdev_state == SDEV_CANCEL || if (sdev->sdev_state == SDEV_CANCEL ||
sdev->sdev_state == SDEV_DEL) sdev->sdev_state == SDEV_DEL)
goto out_fn; goto out_fn;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册