Commit ca24976a authored by Nicholas Bellinger's avatar Nicholas Bellinger

target: Drop legacy se_cmd->check_release bit

Now with iscsi-target using modern se_cmd->cmd_kref accounting in
v3.10 code, it's safe to go ahead and drop the legacy release
codepath + se_cmd->check_release bit in transport_release_cmd()

Cc: Christoph Hellwig <hch@lst.de>
Cc: Roland Dreier <roland@kernel.org>
Cc: Kent Overstreet <koverstreet@google.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Moussa Ba <moussaba@micron.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent b9da5826
...@@ -1952,11 +1952,7 @@ static int transport_release_cmd(struct se_cmd *cmd) ...@@ -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 * If this cmd has been setup with target_get_sess_cmd(), drop
* the kref and call ->release_cmd() in kref callback. * the kref and call ->release_cmd() in kref callback.
*/ */
if (cmd->check_release != 0)
return target_put_sess_cmd(cmd->se_sess, cmd); return target_put_sess_cmd(cmd->se_sess, cmd);
cmd->se_tfo->release_cmd(cmd);
return 1;
} }
/** /**
...@@ -2175,8 +2171,6 @@ int target_get_sess_cmd(struct se_session *se_sess, struct se_cmd *se_cmd, ...@@ -2175,8 +2171,6 @@ int target_get_sess_cmd(struct se_session *se_sess, struct se_cmd *se_cmd,
goto out; goto out;
} }
list_add_tail(&se_cmd->se_cmd_list, &se_sess->sess_cmd_list); list_add_tail(&se_cmd->se_cmd_list, &se_sess->sess_cmd_list);
se_cmd->check_release = 1;
out: out:
spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
return ret; return ret;
......
...@@ -420,8 +420,6 @@ struct se_cmd { ...@@ -420,8 +420,6 @@ struct se_cmd {
int sam_task_attr; int sam_task_attr;
/* Transport protocol dependent state, see transport_state_table */ /* Transport protocol dependent state, see transport_state_table */
enum transport_state_table t_state; 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 cmd_wait_set:1;
unsigned unknown_data_length:1; unsigned unknown_data_length:1;
/* See se_cmd_flags_table */ /* See se_cmd_flags_table */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment