diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 94c5b323db3cb2551f8bc9bb8a848abd4836efdb..ae40addd4ce008b0ee313786b13bbb6d9011c1c2 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -1952,11 +1952,7 @@ static int transport_release_cmd(struct se_cmd *cmd) * If this cmd has been setup with target_get_sess_cmd(), drop * the kref and call ->release_cmd() in kref callback. */ - if (cmd->check_release != 0) - return target_put_sess_cmd(cmd->se_sess, cmd); - - cmd->se_tfo->release_cmd(cmd); - return 1; + return target_put_sess_cmd(cmd->se_sess, cmd); } /** @@ -2175,8 +2171,6 @@ int target_get_sess_cmd(struct se_session *se_sess, struct se_cmd *se_cmd, goto out; } list_add_tail(&se_cmd->se_cmd_list, &se_sess->sess_cmd_list); - se_cmd->check_release = 1; - out: spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); return ret; diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 891ea1f81832b2535bf2f517d8da0f52f485e7d2..9fd7a60f47f067e04dd5ae0563329e9e57e79843 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -420,8 +420,6 @@ struct se_cmd { int sam_task_attr; /* Transport protocol dependent state, see transport_state_table */ enum transport_state_table t_state; - /* Used to signal cmd->se_tfo->check_release_cmd() usage per cmd */ - unsigned check_release:1; unsigned cmd_wait_set:1; unsigned unknown_data_length:1; /* See se_cmd_flags_table */