target: Remove first argument of target_{get,put}_sess_cmd()
authorBart Van Assche <bart.vanassche@sandisk.com>
Mon, 27 Apr 2015 11:52:36 +0000 (13:52 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 31 May 2015 05:41:47 +0000 (22:41 -0700)
The first argument of these two functions is always identical
to se_cmd->se_sess. Hence remove the first argument.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: <qla2xxx-upstream@qlogic.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/scsi/qla2xxx/tcm_qla2xxx.c
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_configfs.c
drivers/target/iscsi/iscsi_target_util.c
drivers/target/target_core_tmr.c
drivers/target/target_core_transport.c
drivers/vhost/scsi.c
include/target/target_core_fabric.h

index 3f40319..9e3662c 100644 (file)
@@ -1332,7 +1332,7 @@ sequence_cmd:
        if (!rc && dump_payload == false && unsol_data)
                iscsit_set_unsoliticed_dataout(cmd);
        else if (dump_payload && imm_data)
-               target_put_sess_cmd(conn->sess->se_sess, &cmd->se_cmd);
+               target_put_sess_cmd(&cmd->se_cmd);
 
        return 0;
 }
@@ -1757,7 +1757,7 @@ isert_put_cmd(struct isert_cmd *isert_cmd, bool comp_err)
                            cmd->se_cmd.t_state == TRANSPORT_WRITE_PENDING) {
                                struct se_cmd *se_cmd = &cmd->se_cmd;
 
-                               target_put_sess_cmd(se_cmd->se_sess, se_cmd);
+                               target_put_sess_cmd(se_cmd);
                        }
                }
 
@@ -1930,7 +1930,7 @@ isert_completion_rdma_read(struct iser_tx_desc *tx_desc,
        spin_unlock_bh(&cmd->istate_lock);
 
        if (ret) {
-               target_put_sess_cmd(se_cmd->se_sess, se_cmd);
+               target_put_sess_cmd(se_cmd);
                transport_send_check_condition_and_sense(se_cmd,
                                                         se_cmd->pi_err, 0);
        } else {
index 9b84b4c..6fbc7bc 100644 (file)
@@ -1334,7 +1334,7 @@ static int srpt_abort_cmd(struct srpt_send_ioctx *ioctx)
 
                BUG_ON(ch->sess == NULL);
 
-               target_put_sess_cmd(ch->sess, &ioctx->cmd);
+               target_put_sess_cmd(&ioctx->cmd);
                goto out;
        }
 
@@ -1365,11 +1365,11 @@ static int srpt_abort_cmd(struct srpt_send_ioctx *ioctx)
                 * not been received in time.
                 */
                srpt_unmap_sg_to_ib_sge(ioctx->ch, ioctx);
-               target_put_sess_cmd(ioctx->ch->sess, &ioctx->cmd);
+               target_put_sess_cmd(&ioctx->cmd);
                break;
        case SRPT_STATE_MGMT_RSP_SENT:
                srpt_set_cmd_state(ioctx, SRPT_STATE_DONE);
-               target_put_sess_cmd(ioctx->ch->sess, &ioctx->cmd);
+               target_put_sess_cmd(&ioctx->cmd);
                break;
        default:
                WARN(1, "Unexpected command state (%d)", state);
@@ -1679,7 +1679,7 @@ static int srpt_check_stop_free(struct se_cmd *cmd)
        struct srpt_send_ioctx *ioctx = container_of(cmd,
                                struct srpt_send_ioctx, cmd);
 
-       return target_put_sess_cmd(ioctx->ch->sess, &ioctx->cmd);
+       return target_put_sess_cmd(&ioctx->cmd);
 }
 
 /**
@@ -3074,7 +3074,7 @@ static void srpt_queue_response(struct se_cmd *cmd)
                       ioctx->tag);
                srpt_unmap_sg_to_ib_sge(ch, ioctx);
                srpt_set_cmd_state(ioctx, SRPT_STATE_DONE);
-               target_put_sess_cmd(ioctx->ch->sess, &ioctx->cmd);
+               target_put_sess_cmd(&ioctx->cmd);
        }
 }
 
index 5c9e680..8a6c875 100644 (file)
@@ -429,7 +429,7 @@ static int tcm_qla2xxx_check_stop_free(struct se_cmd *se_cmd)
                cmd->cmd_flags |= BIT_14;
        }
 
-       return target_put_sess_cmd(se_cmd->se_sess, se_cmd);
+       return target_put_sess_cmd(se_cmd);
 }
 
 /* tcm_qla2xxx_release_cmd - Callback from TCM Core to release underlying
Simple merge
Simple merge
Simple merge
Simple merge