提交 87cd9eab 编写于 作者: M Mike Christie 提交者: James Bottomley

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: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 6f481e3c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册