提交 46ccf6b5 编写于 作者: H Hannes Reinecke 提交者: James Bottomley

[SCSI] scsi_dh_alua: always update TPGS status on activate

When activating a patch we should always update the TPGS state
as it might have changed in between.
Signed-off-by: NHannes Reinecke <hare@suse.de>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 6c3633d0
...@@ -631,11 +631,9 @@ static int alua_activate(struct scsi_device *sdev, ...@@ -631,11 +631,9 @@ static int alua_activate(struct scsi_device *sdev,
struct alua_dh_data *h = get_alua_data(sdev); struct alua_dh_data *h = get_alua_data(sdev);
int err = SCSI_DH_OK; int err = SCSI_DH_OK;
if (h->group_id != -1) { err = alua_rtpg(sdev, h);
err = alua_rtpg(sdev, h); if (err != SCSI_DH_OK)
if (err != SCSI_DH_OK) goto out;
goto out;
}
if (h->tpgs & TPGS_MODE_EXPLICIT && if (h->tpgs & TPGS_MODE_EXPLICIT &&
h->state != TPGS_STATE_OPTIMIZED && h->state != TPGS_STATE_OPTIMIZED &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册