From 008841b622542a276de097c0dc253113c8c10c87 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 10 Jul 2010 07:17:30 +0000 Subject: [PATCH] Minor optimization: merged a srpt_get_cmd_state() and srpt_set_cmd_state() call. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1811 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 5df3cc2d1..2b0d58782 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1211,7 +1211,7 @@ static void srpt_handle_send_comp(struct srpt_rdma_ch *ch, enum srpt_command_state state; struct scst_cmd *scmnd; - state = srpt_get_cmd_state(ioctx); + state = srpt_set_cmd_state(ioctx, SRPT_STATE_DONE); scmnd = ioctx->scmnd; WARN_ON(state != SRPT_STATE_CMD_RSP_SENT @@ -1219,7 +1219,6 @@ static void srpt_handle_send_comp(struct srpt_rdma_ch *ch, && state != SRPT_STATE_DONE); WARN_ON(state == SRPT_STATE_MGMT_RSP_SENT && scmnd); - srpt_set_cmd_state(ioctx, SRPT_STATE_DONE); if (state == SRPT_STATE_DONE) PRINT_ERROR("IB completion has been received too late for" " wr_id = %u.", ioctx->index);