From 0c2ad7d1132d8b089b1d37875917858e03610019 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 17 Jun 2012 18:40:52 -0400 Subject: 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 Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_transport.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/target/target_core_transport.c') diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 82946962796..803ac5202fc 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); -- cgit v1.2.3