From 1a4aa10db80618767a404e88a1a2ae481930cfa6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 27 Apr 2013 19:05:22 +0000 Subject: [PATCH] ib_srpt: Fix a bug that was introduced in r4784 Reported by: Matteo Tescione git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4844 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 46d75e894..21554cbea 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -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);