diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2015-09-29 15:10:44 -0700 |
---|---|---|
committer | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-02-08 16:41:10 -0800 |
commit | 0bd8c98849e3e6cdfe07010fecf410a204c159af (patch) | |
tree | 155a23219003228cfa41b9337513b3c6d7c2782b /drivers/infiniband/ulp | |
parent | 344efbd2c17488903bcece3b6a5da20660f83308 (diff) |
target: Inline transport_check_aborted_status()
Due to the previous patch the second argument of
transport_check_aborted_status() is ignored and that function does
no longer have any side effect. Hence remove all calls of that
function that do not check the return value. Additionally, inline
this function.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cc: Andy Grover <agrover@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index d21ba9d857c3..9241553f796d 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1161,6 +1161,7 @@ static int srpt_abort_cmd(struct srpt_send_ioctx *ioctx) * Do nothing - defer abort processing until * srpt_queue_response() is invoked. */ + WARN_ON_ONCE(!(ioctx->cmd.transport_state & CMD_T_ABORTED)); break; case SRPT_STATE_NEED_DATA: pr_debug("tag %#llx: RDMA read error\n", ioctx->cmd.tag); @@ -2289,7 +2290,7 @@ static void srpt_queue_response(struct se_cmd *cmd) } spin_unlock_irqrestore(&ioctx->spinlock, flags); - if (unlikely(transport_check_aborted_status(&ioctx->cmd, false) + if (unlikely((ioctx->cmd.transport_state & CMD_T_ABORTED) || WARN_ON_ONCE(state == SRPT_STATE_CMD_RSP_SENT))) { atomic_inc(&ch->req_lim_delta); srpt_abort_cmd(ioctx); |