]> Pileus Git - ~andy/linux/commitdiff
target: Fix incorrect inversion of TPGS_EXPLICT_ALUA check
authorNicholas Bellinger <nab@linux-iscsi.org>
Tue, 6 Nov 2012 20:36:12 +0000 (12:36 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 7 Nov 2012 04:55:46 +0000 (20:55 -0800)
Fix a bug introduced with patch "target: pass sense_reason as a return value"
in for-3.8 code where only target port groups with TPGS_EXPLICT_ALUA set
need to be allowed to perform explictly ALUA.

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_alua.c

index e62dc529e516b7c97ecf002b1396fae253bca238..4c8eea270d1627c840db16ad2d67c2b01cb4a9b1 100644 (file)
@@ -251,7 +251,7 @@ target_emulate_set_target_port_groups(struct se_cmd *cmd)
        }
        spin_unlock(&l_tg_pt_gp_mem->tg_pt_gp_mem_lock);
 
-       if (l_tg_pt_gp->tg_pt_gp_alua_access_type & TPGS_EXPLICT_ALUA) {
+       if (!(l_tg_pt_gp->tg_pt_gp_alua_access_type & TPGS_EXPLICT_ALUA)) {
                pr_debug("Unable to process SET_TARGET_PORT_GROUPS"
                                " while TPGS_EXPLICT_ALUA is disabled\n");
                rc = TCM_UNSUPPORTED_SCSI_OPCODE;