From 2e071339175b1e201e761cd8b2af2e19800a6c1a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 4 Jul 2010 20:11:47 +0000 Subject: [PATCH] Converted a WARN_ON() statement into PRINT_INFO(). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1802 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index b01fb166f..bc9dd86ac 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1778,7 +1778,7 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch) if (IS_ERR(ch->rcq)) { ret = PTR_ERR(ch->rcq); PRINT_ERROR("failed to create CQ cqe= %d ret= %d", - SRPT_RQ_SIZE, ret); + SRPT_RQ_SIZE, ret); goto out; } #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) \ @@ -1792,7 +1792,7 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch) if (IS_ERR(ch->scq)) { ret = PTR_ERR(ch->scq); PRINT_ERROR("failed to create CQ cqe= %d ret= %d", - SRPT_SQ_SIZE, ret); + SRPT_SQ_SIZE, ret); goto out_destroy_rcq; } @@ -2864,12 +2864,11 @@ static int srpt_xmit_response(struct scst_cmd *scmnd) srpt_get_cmd_state(ioctx), scmnd->state); srpt_abort_scst_cmd(ioctx, SCST_CONTEXT_SAME); - /* - * Returning SCST_TGT_RES_SUCCESS without having called - * scst_tgt_cmd_done() first will cause session unregistration - * to lock up. Hence the WARN_ON() below. - */ - WARN_ON(scmnd->state != SCST_CMD_STATE_FINISHED); + if (scmnd->state != SCST_CMD_STATE_FINISHED) + PRINT_INFO("cmd with tag %lld has been aborted" + " and has now SCST state %d - session" + " unregistration will wait.", + scst_cmd_get_tag(scmnd), scmnd->state); ret = SCST_TGT_RES_SUCCESS; goto out; }