[PATCH 03/13] target: do not pass the queue object to transport_remove_cmd_from_queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>

Index: lio-core/drivers/target/target_core_transport.c
===================================================================
--- lio-core.orig/drivers/target/target_core_transport.c	2011-10-16 19:13:20.249285926 +0200
+++ lio-core/drivers/target/target_core_transport.c	2011-10-16 19:15:27.157283446 +0200
@@ -83,8 +83,7 @@ static u32 transport_allocate_tasks(stru
 		struct scatterlist *sgl, unsigned int nents);
 static int transport_generic_get_mem(struct se_cmd *cmd);
 static void transport_put_cmd(struct se_cmd *cmd);
-static void transport_remove_cmd_from_queue(struct se_cmd *cmd,
-		struct se_queue_obj *qobj);
+static void transport_remove_cmd_from_queue(struct se_cmd *cmd);
 static int transport_set_sense_codes(struct se_cmd *cmd, u8 asc, u8 ascq);
 static void transport_stop_all_task_timers(struct se_cmd *cmd);
 
@@ -594,7 +593,7 @@ void transport_cmd_finish_abort(struct s
 	if (transport_cmd_check_stop_to_fabric(cmd))
 		return;
 	if (remove) {
-		transport_remove_cmd_from_queue(cmd, &cmd->se_dev->dev_queue_obj);
+		transport_remove_cmd_from_queue(cmd);
 		transport_put_cmd(cmd);
 	}
 }
@@ -653,9 +652,9 @@ transport_get_cmd_from_queue(struct se_q
 	return cmd;
 }
 
-static void transport_remove_cmd_from_queue(struct se_cmd *cmd,
-		struct se_queue_obj *qobj)
+static void transport_remove_cmd_from_queue(struct se_cmd *cmd)
 {
+	struct se_queue_obj *qobj = &cmd->se_dev->dev_queue_obj;
 	unsigned long flags;
 
 	spin_lock_irqsave(&qobj->cmd_queue_lock, flags);
@@ -4234,7 +4233,7 @@ static int transport_lun_wait_for_tasks(
 		pr_debug("ConfigFS: ITT[0x%08x] - stopped cmd....\n",
 				cmd->se_tfo->get_task_tag(cmd));
 	}
-	transport_remove_cmd_from_queue(cmd, &cmd->se_dev->dev_queue_obj);
+	transport_remove_cmd_from_queue(cmd);
 
 	return 0;
 }

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux