aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-10-17 13:56:43 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2011-10-23 23:21:36 -0400
commit3df8d40ba3fea72c35ab092c091b19a599df1e81 (patch)
tree910896f429892ff39f1caa72473582d84a40487a
parentf7a5cc0b310af887f5391ba886d3d9254ac8920a (diff)
target: do not pass the queue object to transport_remove_cmd_from_queue
We always operated on the same queue, so move finding it into the function, just like we do for all other helpers operating on it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--drivers/target/target_core_transport.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index b5c3daf12169..5fe38e4a5025 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -82,8 +82,7 @@ static u32 transport_allocate_tasks(struct se_cmd *cmd,
82 struct scatterlist *sgl, unsigned int nents); 82 struct scatterlist *sgl, unsigned int nents);
83static int transport_generic_get_mem(struct se_cmd *cmd); 83static int transport_generic_get_mem(struct se_cmd *cmd);
84static void transport_put_cmd(struct se_cmd *cmd); 84static void transport_put_cmd(struct se_cmd *cmd);
85static void transport_remove_cmd_from_queue(struct se_cmd *cmd, 85static void transport_remove_cmd_from_queue(struct se_cmd *cmd);
86 struct se_queue_obj *qobj);
87static int transport_set_sense_codes(struct se_cmd *cmd, u8 asc, u8 ascq); 86static int transport_set_sense_codes(struct se_cmd *cmd, u8 asc, u8 ascq);
88static void transport_stop_all_task_timers(struct se_cmd *cmd); 87static void transport_stop_all_task_timers(struct se_cmd *cmd);
89 88
@@ -591,7 +590,7 @@ void transport_cmd_finish_abort(struct se_cmd *cmd, int remove)
591 if (transport_cmd_check_stop_to_fabric(cmd)) 590 if (transport_cmd_check_stop_to_fabric(cmd))
592 return; 591 return;
593 if (remove) { 592 if (remove) {
594 transport_remove_cmd_from_queue(cmd, &cmd->se_dev->dev_queue_obj); 593 transport_remove_cmd_from_queue(cmd);
595 transport_put_cmd(cmd); 594 transport_put_cmd(cmd);
596 } 595 }
597} 596}
@@ -650,9 +649,9 @@ transport_get_cmd_from_queue(struct se_queue_obj *qobj)
650 return cmd; 649 return cmd;
651} 650}
652 651
653static void transport_remove_cmd_from_queue(struct se_cmd *cmd, 652static void transport_remove_cmd_from_queue(struct se_cmd *cmd)
654 struct se_queue_obj *qobj)
655{ 653{
654 struct se_queue_obj *qobj = &cmd->se_dev->dev_queue_obj;
656 unsigned long flags; 655 unsigned long flags;
657 656
658 spin_lock_irqsave(&qobj->cmd_queue_lock, flags); 657 spin_lock_irqsave(&qobj->cmd_queue_lock, flags);
@@ -4232,7 +4231,7 @@ static int transport_lun_wait_for_tasks(struct se_cmd *cmd, struct se_lun *lun)
4232 pr_debug("ConfigFS: ITT[0x%08x] - stopped cmd....\n", 4231 pr_debug("ConfigFS: ITT[0x%08x] - stopped cmd....\n",
4233 cmd->se_tfo->get_task_tag(cmd)); 4232 cmd->se_tfo->get_task_tag(cmd));
4234 } 4233 }
4235 transport_remove_cmd_from_queue(cmd, &cmd->se_dev->dev_queue_obj); 4234 transport_remove_cmd_from_queue(cmd);
4236 4235
4237 return 0; 4236 return 0;
4238} 4237}