[SCSI] scsi_dh_alua: always update TPGS status on activate
authorHannes Reinecke <hare@suse.de>
Wed, 24 Aug 2011 08:51:16 +0000 (10:51 +0200)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 30 Aug 2011 19:31:03 +0000 (12:31 -0700)
When activating a patch we should always update the TPGS state
as it might have changed in between.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/device_handler/scsi_dh_alua.c

index 80c5cf327b84fa6dd14bad2b5e87779a49f0d758..f44dbf69843a23ee53a8548f580d13380d89d9ae 100644 (file)
@@ -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 &&