ib_srpt: Fix a bug that was introduced in r4784

Reported by: Matteo Tescione <matteo@rmnet.it>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4844 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-04-27 19:05:22 +00:00
parent 4ce549b875
commit 1a4aa10db8
+3 -4
View File
@@ -1493,13 +1493,12 @@ static void srpt_handle_send_comp(struct srpt_rdma_ch *ch,
struct scst_cmd *scmnd;
scmnd = &ioctx->scmnd;
EXTRACHECKS_WARN_ON((state == SRPT_STATE_MGMT_RSP_SENT)
!= (scmnd == NULL));
if (scmnd) {
if (state != SRPT_STATE_MGMT_RSP_SENT) {
srpt_unmap_sg_to_ib_sge(ch, ioctx);
scst_tgt_cmd_done(scmnd, context);
} else
} else {
srpt_put_send_ioctx(ioctx);
}
} else {
PRINT_ERROR("IB completion has been received too late for"
" wr_id = %u.", ioctx->ioctx.index);