Skip to content

Commit

Permalink
[SCSI] scsi_dh_alua: always update TPGS status on activate
Browse files Browse the repository at this point in the history
When activating a patch we should always update the TPGS state
as it might have changed in between.

Signed-off-by: Hannes Reinecke <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
hreinecke authored and James Bottomley committed Aug 30, 2011
1 parent 6c3633d commit 46ccf6b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/scsi/device_handler/scsi_dh_alua.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
err = alua_rtpg(sdev, h);
if (err != SCSI_DH_OK)
goto out;

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

0 comments on commit 46ccf6b

Please sign in to comment.