iscsi-target: Fix iscsit_get_tpg_from_np tpg_state bug
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 26 Feb 2014 11:09:41 +0000 (03:09 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 5 Mar 2014 01:54:09 +0000 (17:54 -0800)
commita2a99cea5ec7c1e47825559f0e75a4efbcf8aee3
tree7fe227c3f0302dc31ee18592224c52ae8da649c9
parent7fe412d07d881020022a188b95c63a19b651a391
iscsi-target: Fix iscsit_get_tpg_from_np tpg_state bug

This patch fixes a bug in iscsit_get_tpg_from_np() where the
tpg->tpg_state sanity check was looking for TPG_STATE_FREE,
instead of != TPG_STATE_ACTIVE.

The latter is expected during a normal TPG shutdown once the
tpg_state goes into TPG_STATE_INACTIVE in order to reject any
new incoming login attempts.

Cc: <stable@vger.kernel.org> #3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_tpg.c