diff options
author | Christoph Hellwig | 2012-06-18 00:40:52 +0200 |
---|---|---|
committer | Nicholas Bellinger | 2012-07-17 02:29:12 +0200 |
commit | 0c2ad7d1132d8b089b1d37875917858e03610019 (patch) | |
tree | e86cc118497605026a15c0e97630c57aeb625793 /drivers/target/target_core_transport.c | |
parent | target: remove dead SCF_ flags (diff) | |
download | kernel-qcow2-linux-0c2ad7d1132d8b089b1d37875917858e03610019.tar.gz kernel-qcow2-linux-0c2ad7d1132d8b089b1d37875917858e03610019.tar.xz kernel-qcow2-linux-0c2ad7d1132d8b089b1d37875917858e03610019.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.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 82946962796d..803ac5202fcd 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -1865,7 +1865,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); @@ -1873,10 +1873,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); |