iscsi-target: Fix non-immediate TMR handling
commit622dadf0a4cb5bcf648363121733031b2b2eb93a
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 28 Oct 2011 20:37:19 +0000 (28 13:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:44:19 +0000 (11 09:44 -0800)
tree79dcbe1aeb1daef491aa8a70bf5d83d4e1e0096b
parentebe1d9e9db0783fc3c74f239db7833dff28d1218
iscsi-target: Fix non-immediate TMR handling

commit 5a4c8666c6d576f076a7c6824589cdbb984c0f84 upstream.

This patch addresses two issues with non immediate TMR handling in
iscsit_handle_task_mgt_cmd().  The first involves breakage due to
v3.1-rc conversion of iscsit_sequence_cmd(), which upon good status
would hit the iscsit_add_reject_from_cmd() block of code.  This patch
adds an explict check for CMDSN_ERROR_CANNOT_RECOVER.

The second adds a check to return when non immediate TMR operation is
detected after iscsit_ack_from_expstatsn(), as iscsit_sequence_cmd()
-> iscsit_execute_cmd() will have called transport_generic_handle_tmr()
for the non immediate TMR case already.

Cc: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/target/iscsi/iscsi_target.c