mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 21:56:31 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user