This commit wants to add a missed complete operation in function iscsit_close_connection(). Under heavy IO pressure against one HDD target LUN, I find in error recovery process, function iscsit_close_session() may stuck at wating for completion session_wait_comp. The only function would complete it is iscsit_close_connection(), but when return at the code routine session_fall_back_to_erl0, it will return without completing session_wait_comp, cause iscsit_close_session() hung, left D status threads. Signed-off-by: Zhu Lingshan <lszhu@xxxxxxxx> --- drivers/target/iscsi/iscsi_target.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index d57d10c..e0b86bb 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -4142,6 +4142,8 @@ int iscsit_close_connection( atomic_read(&sess->session_fall_back_to_erl0)) { spin_unlock_bh(&sess->conn_lock); target_put_session(sess->se_sess); + if (atomic_read(&sess->sleep_on_sess_wait_comp)) + complete(&sess->session_wait_comp); return 0; } else if (atomic_read(&sess->session_logout)) { -- 2.6.6 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html