qla2x00t-32gbit: Complain loudly about reference count underflow

Reference undercount underflow is a serious issue so complain loudly
about it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8187 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-04-13 22:50:45 +00:00
parent c5f45ada28
commit 1c65ca5dc1
3 changed files with 7 additions and 25 deletions
+1 -4
View File
@@ -142,11 +142,8 @@ static void qla_nvme_sp_ls_done(void *ptr, int res)
struct nvmefc_ls_req *fd;
struct nvme_private *priv;
if (atomic_read(&sp->ref_count) == 0) {
ql_log(ql_log_warn, sp->fcport->vha, 0x2123,
"SP reference-count to ZERO on LS_done -- sp=%p.\n", sp);
if (WARN_ON(atomic_read(&sp->ref_count) == 0))
return;
}
if (!atomic_dec_and_test(&sp->ref_count))
return;
+4 -14
View File
@@ -807,14 +807,9 @@ qla2x00_sp_compl(void *ptr, int res)
cmd->result = res;
if (atomic_read(&sp->ref_count) == 0) {
ql_dbg(ql_dbg_io, sp->vha, 0x3015,
"SP reference-count to ZERO -- sp=%p cmd=%p.\n",
sp, GET_CMD_SP(sp));
if (ql2xextended_error_logging & ql_dbg_io)
WARN_ON(atomic_read(&sp->ref_count) == 0);
if (WARN_ON(atomic_read(&sp->ref_count) == 0))
return;
}
if (!atomic_dec_and_test(&sp->ref_count))
return;
@@ -916,14 +911,9 @@ qla2xxx_qpair_sp_compl(void *ptr, int res)
cmd->result = res;
if (atomic_read(&sp->ref_count) == 0) {
ql_dbg(ql_dbg_io, sp->fcport->vha, 0x3079,
"SP reference-count to ZERO -- sp=%p cmd=%p.\n",
sp, GET_CMD_SP(sp));
if (ql2xextended_error_logging & ql_dbg_io)
WARN_ON(atomic_read(&sp->ref_count) == 0);
if (WARN_ON(atomic_read(&sp->ref_count) == 0))
return;
}
if (!atomic_dec_and_test(&sp->ref_count))
return;
+2 -7
View File
@@ -679,14 +679,9 @@ qla2x00_sp_compl(void *data, void *ptr, int res)
cmd->result = res;
if (atomic_read(&sp->ref_count) == 0) {
ql_dbg(ql_dbg_io, sp->fcport->vha, 0x3015,
"SP reference-count to ZERO -- sp=%p cmd=%p.\n",
sp, GET_CMD_SP(sp));
if (ql2xextended_error_logging & ql_dbg_io)
BUG();
if (WARN_ON(atomic_read(&sp->ref_count) == 0))
return;
}
if (!atomic_dec_and_test(&sp->ref_count))
return;