libiscsi: check reason why we are stopping iscsi session to determine error value
authorMike Christie <michaelc@cs.wisc.edu>
Wed, 24 Sep 2008 16:46:14 +0000 (11:46 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 13 Oct 2008 13:29:01 +0000 (09:29 -0400)
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>

drivers/scsi/libiscsi.c

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