Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46ccf6b5 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by James Bottomley
Browse files

[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: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 6c3633d0
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -631,11 +631,9 @@ static int alua_activate(struct scsi_device *sdev,
	struct alua_dh_data *h = get_alua_data(sdev);
	int err = SCSI_DH_OK;

	if (h->group_id != -1) {
	err = alua_rtpg(sdev, h);
	if (err != SCSI_DH_OK)
		goto out;
	}

	if (h->tpgs & TPGS_MODE_EXPLICIT &&
	    h->state != TPGS_STATE_OPTIMIZED &&