On 10/9/18 4:37 AM, David Disseldorp wrote:
failure: spin_unlock_bh(&cmd->dataout_timeout_lock); + { + struct iscsi_portal_group *tpg = conn->sess->tpg; + struct iscsi_tiqn *tiqn = tpg->tpg_tiqn; + + if (tiqn) { + spin_lock_bh(&tiqn->sess_err_stats.lock); + strcpy(tiqn->sess_err_stats.last_sess_fail_rem_name, + conn->sess->sess_ops->InitiatorName); + tiqn->sess_err_stats.last_sess_failure_type = + ISCSI_SESS_ERR_CXN_TIMEOUT; + tiqn->sess_err_stats.cxn_timeout_errors++; + atomic_long_inc(&conn->sess->conn_timeout_errors); + spin_unlock_bh(&tiqn->sess_err_stats.lock); + } + } iscsit_cause_connection_reinstatement(conn, 0); iscsit_dec_conn_usage_count(conn); }
Please introduce a helper function instead of not indenting a nested code block. Thanks, Bart.