summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_transport.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-06-17 18:40:52 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-06-21 11:29:52 -0700
commitb02c2cf1a1975100963905b9d731656e9a05bd48 (patch)
treeac01bb63925e9988e3d2879927cd321f47161928 /drivers/target/target_core_transport.c
parentc9e649fdc1a0a55e72a649045c496bafd728e005 (diff)
downloadlinux-b02c2cf1a1975100963905b9d731656e9a05bd48.tar.gz
linux-b02c2cf1a1975100963905b9d731656e9a05bd48.tar.xz
linux-b02c2cf1a1975100963905b9d731656e9a05bd48.zip
target: add struct spc_ops + initial ->execute_rw pointer usage
Remove the execute_cmd method in struct se_subsystem_api, and always use the one directly in struct se_cmd. To make life simpler for SBC virtual backends a struct spc_ops that is passed to sbc_parse_cmd is added. For now it only contains an execute_rw member, but more will follow with the subsequent commits. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r--drivers/target/target_core_transport.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index be843aa689b6..23a49c9eab63 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1859,7 +1859,7 @@ EXPORT_SYMBOL(transport_generic_request_failure);
static void __target_execute_cmd(struct se_cmd *cmd)
{
- int error;
+ int error = 0;
spin_lock_irq(&cmd->t_state_lock);
cmd->transport_state |= (CMD_T_BUSY|CMD_T_SENT);
@@ -1867,10 +1867,6 @@ static void __target_execute_cmd(struct se_cmd *cmd)
if (cmd->execute_cmd)
error = cmd->execute_cmd(cmd);
- else {
- error = cmd->se_dev->transport->execute_cmd(cmd, cmd->t_data_sg,
- cmd->t_data_nents, cmd->data_direction);
- }
if (error) {
spin_lock_irq(&cmd->t_state_lock);