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_ONCE(atomic_read(&sp->ref_count) == 0))
return;
- }
atomic_dec(&sp->ref_count);
nvme = &sp->u.iocb_cmd;
fd = nvme->u.nvme.desc;
+ if (WARN_ON_ONCE(atomic_read(&sp->ref_count) == 0))
+ return;
+
atomic_dec(&sp->ref_count);
if (res == QLA_SUCCESS) {
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);
struct scsi_cmnd *cmd = GET_CMD_SP(sp);
struct completion *comp = sp->comp;
- 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_ONCE(atomic_read(&sp->ref_count) == 0))
return;
- }
atomic_dec(&sp->ref_count);
struct scsi_cmnd *cmd = GET_CMD_SP(sp);
struct completion *comp = sp->comp;
- 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_ONCE(atomic_read(&sp->ref_count) == 0))
return;
- }
atomic_dec(&sp->ref_count);