mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
qla2x00t: Eliminate double req_q_cnt checks when there is enough headroom (merge r4135 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4632 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2087,15 +2087,15 @@ static int q2t_check_reserve_free_req(scsi_qla_host_t *ha, uint32_t req_cnt)
|
||||
else
|
||||
ha->req_q_cnt = ha->request_q_length -
|
||||
(ha->req_ring_index - cnt);
|
||||
}
|
||||
|
||||
if (unlikely(ha->req_q_cnt < (req_cnt + 2))) {
|
||||
TRACE(TRACE_OUT_OF_MEM, "qla2x00t(%ld): There is no room in the "
|
||||
"request ring: ha->req_ring_index=%d, ha->req_q_cnt=%d, "
|
||||
"req_cnt=%d", ha->instance, ha->req_ring_index,
|
||||
ha->req_q_cnt, req_cnt);
|
||||
res = SCST_TGT_RES_QUEUE_FULL;
|
||||
goto out;
|
||||
if (unlikely(ha->req_q_cnt < (req_cnt + 2))) {
|
||||
TRACE(TRACE_OUT_OF_MEM, "qla2x00t(%ld): There is no room in the "
|
||||
"request ring: ha->req_ring_index=%d, ha->req_q_cnt=%d, "
|
||||
"req_cnt=%d", ha->instance, ha->req_ring_index,
|
||||
ha->req_q_cnt, req_cnt);
|
||||
res = SCST_TGT_RES_QUEUE_FULL;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
ha->req_q_cnt -= req_cnt;
|
||||
|
||||
Reference in New Issue
Block a user