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

Commit a2e85d18 authored by Nicholas Bellinger's avatar Nicholas Bellinger
Browse files

target: Fix incorrect inversion of TPGS_EXPLICT_ALUA check



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: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent de103c93
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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);
	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"
		pr_debug("Unable to process SET_TARGET_PORT_GROUPS"
				" while TPGS_EXPLICT_ALUA is disabled\n");
				" while TPGS_EXPLICT_ALUA is disabled\n");
		rc = TCM_UNSUPPORTED_SCSI_OPCODE;
		rc = TCM_UNSUPPORTED_SCSI_OPCODE;