libiscsi: check reason why we are stopping iscsi session to determine error value

Some wires got crossed on some patches and I messed up in the code
below when rebuilding a patch. We want to be checking if flag
equaled the value indicating if we killing the session due to
final logout or if we just trying to relogin.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Mike Christie 2008-09-24 11:46:14 -05:00 committed by James Bottomley
parent 6f481e3cef
commit 87cd9eab2d
1 changed files with 1 additions and 1 deletions

View File

@ -2453,7 +2453,7 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
* flush queues. * flush queues.
*/ */
spin_lock_bh(&session->lock); spin_lock_bh(&session->lock);
if (STOP_CONN_RECOVER) if (flag == STOP_CONN_RECOVER)
fail_all_commands(conn, -1, DID_TRANSPORT_DISRUPTED); fail_all_commands(conn, -1, DID_TRANSPORT_DISRUPTED);
else else
fail_all_commands(conn, -1, DID_ERROR); fail_all_commands(conn, -1, DID_ERROR);