mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 11:11:27 +00:00
qla2xxx-32gbit: Complain loudly about reference count underflow
A reference count underflow is a severe bug. Hence complain loudly if a reference count underflow happens. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8302 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -142,7 +142,7 @@ static void qla_nvme_sp_ls_done(void *ptr, int res)
|
||||
struct nvmefc_ls_req *fd;
|
||||
struct nvme_private *priv;
|
||||
|
||||
if (WARN_ON(atomic_read(&sp->ref_count) == 0))
|
||||
if (WARN_ON_ONCE(atomic_read(&sp->ref_count) == 0))
|
||||
return;
|
||||
|
||||
atomic_dec(&sp->ref_count);
|
||||
@@ -168,7 +168,7 @@ static void qla_nvme_sp_done(void *ptr, int res)
|
||||
nvme = &sp->u.iocb_cmd;
|
||||
fd = nvme->u.nvme.desc;
|
||||
|
||||
if (WARN_ON(atomic_read(&sp->ref_count) == 0))
|
||||
if (WARN_ON_ONCE(atomic_read(&sp->ref_count) == 0))
|
||||
return;
|
||||
|
||||
atomic_dec(&sp->ref_count);
|
||||
@@ -210,13 +210,8 @@ static void qla_nvme_abort_work(struct work_struct *work)
|
||||
return;
|
||||
}
|
||||
|
||||
if (atomic_read(&sp->ref_count) == 0) {
|
||||
WARN_ON(1);
|
||||
ql_log(ql_log_info, fcport->vha, 0xffff,
|
||||
"%s: command already aborted on sp: %p\n",
|
||||
__func__, sp);
|
||||
if (WARN_ON_ONCE(atomic_read(&sp->ref_count) == 0))
|
||||
return;
|
||||
}
|
||||
|
||||
rval = ha->isp_ops->abort_command(sp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user