Commit a2e85d18146857ffddea4dfe3b245055af8e3db3

Authored by Nicholas Bellinger
1 parent de103c93af

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: Nicholas Bellinger <nab@linux-iscsi.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/target/target_core_alua.c
... ... @@ -251,7 +251,7 @@
251 251 }
252 252 spin_unlock(&l_tg_pt_gp_mem->tg_pt_gp_mem_lock);
253 253  
254   - if (l_tg_pt_gp->tg_pt_gp_alua_access_type & TPGS_EXPLICT_ALUA) {
  254 + if (!(l_tg_pt_gp->tg_pt_gp_alua_access_type & TPGS_EXPLICT_ALUA)) {
255 255 pr_debug("Unable to process SET_TARGET_PORT_GROUPS"
256 256 " while TPGS_EXPLICT_ALUA is disabled\n");
257 257 rc = TCM_UNSUPPORTED_SCSI_OPCODE;