From 55794571dbed4ec110be147c7dfa422c41429d2a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 3 Dec 2010 11:43:37 +0000 Subject: [PATCH] ib_srpt: Pass correct atomic context information to scst_rx_cmd(). (Merged r2912 from the trunk.) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2914 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 46fe4481e..2768ca0dc 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1486,14 +1486,17 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, scst_data_direction dir; u64 data_len; int ret; + int atomic; BUG_ON(!send_ioctx); srp_cmd = recv_ioctx->ioctx.buf; + atomic = context == SCST_CONTEXT_TASKLET ? SCST_ATOMIC + : SCST_NON_ATOMIC; scmnd = scst_rx_cmd(ch->scst_sess, (u8 *) &srp_cmd->lun, sizeof srp_cmd->lun, srp_cmd->cdb, - sizeof srp_cmd->cdb, context); + sizeof srp_cmd->cdb, atomic); if (!scmnd) { PRINT_ERROR("0x%llx: allocation of an SCST command failed", srp_cmd->tag);