[PATCH 4/5] scsi: target: Unexport target_queue_submission

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

 



target_queue_submission is not called by drivers anymore so unexport it.
This moves target_submit to before target_queue_submission so we can
easily call it. It does not change any behavior.

Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx>
---
 drivers/target/target_core_transport.c | 59 +++++++++++++-------------
 include/target/target_core_fabric.h    |  1 -
 2 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 5349a2dd8187..701ca3593599 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1826,34 +1826,6 @@ static void __target_submit(struct se_cmd *se_cmd)
 	transport_handle_cdb_direct(se_cmd);
 }
 
-/**
- * target_submit - submit cmd to LIO core or queue it's submission
- * @se_cmd: command descriptor to submit
- */
-void target_submit(struct se_cmd *se_cmd)
-{
-	struct se_dev_attrib *da = &se_cmd->se_dev->dev_attrib;
-	u32 direct_submit;
-
-	if (da->direct_submit == DA_FABRIC_DEFAULT_SUBMIT) {
-		if (se_cmd->se_sess->se_tpg->se_tpg_tfo->default_direct_submit)
-			direct_submit = DA_DIRECT_SUBMIT;
-		else
-			direct_submit = DA_QUEUE_SUBMIT;
-	} else if (da->direct_submit == DA_DIRECT_SUBMIT &&
-		   se_cmd->se_sess->se_tpg->se_tpg_tfo->direct_submit_supp) {
-		direct_submit = DA_DIRECT_SUBMIT;
-	} else {
-		direct_submit = DA_QUEUE_SUBMIT;
-	}
-
-	if (direct_submit == DA_DIRECT_SUBMIT)
-		__target_submit(se_cmd);
-	else
-		target_queue_submission(se_cmd);
-}
-EXPORT_SYMBOL_GPL(target_submit);
-
 /**
  * target_submit_cmd - lookup unpacked lun and submit uninitialized se_cmd
  *
@@ -1960,7 +1932,7 @@ void target_queued_submit_work(struct work_struct *work)
  * target_queue_submission - queue the cmd to run on the LIO workqueue
  * @se_cmd: command descriptor to submit
  */
-void target_queue_submission(struct se_cmd *se_cmd)
+static void target_queue_submission(struct se_cmd *se_cmd)
 {
 	struct se_device *se_dev = se_cmd->se_dev;
 	int cpu = se_cmd->cpuid;
@@ -1970,7 +1942,34 @@ void target_queue_submission(struct se_cmd *se_cmd)
 	llist_add(&se_cmd->se_cmd_list, &sq->cmd_list);
 	queue_work_on(cpu, target_submission_wq, &sq->work);
 }
-EXPORT_SYMBOL_GPL(target_queue_submission);
+
+/**
+ * target_submit - submit cmd to LIO core or queue it's submission
+ * @se_cmd: command descriptor to submit
+ */
+void target_submit(struct se_cmd *se_cmd)
+{
+	struct se_dev_attrib *da = &se_cmd->se_dev->dev_attrib;
+	u32 direct_submit;
+
+	if (da->direct_submit == DA_FABRIC_DEFAULT_SUBMIT) {
+		if (se_cmd->se_sess->se_tpg->se_tpg_tfo->default_direct_submit)
+			direct_submit = DA_DIRECT_SUBMIT;
+		else
+			direct_submit = DA_QUEUE_SUBMIT;
+	} else if (da->direct_submit == DA_DIRECT_SUBMIT &&
+		   se_cmd->se_sess->se_tpg->se_tpg_tfo->direct_submit_supp) {
+		direct_submit = DA_DIRECT_SUBMIT;
+	} else {
+		direct_submit = DA_QUEUE_SUBMIT;
+	}
+
+	if (direct_submit == DA_DIRECT_SUBMIT)
+		__target_submit(se_cmd);
+	else
+		target_queue_submission(se_cmd);
+}
+EXPORT_SYMBOL_GPL(target_submit);
 
 static void target_complete_tmr_failure(struct work_struct *work)
 {
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index 5b2367c0839e..77f69b75e851 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -183,7 +183,6 @@ sense_reason_t target_cmd_init_cdb(struct se_cmd *se_cmd, unsigned char *cdb,
 sense_reason_t target_cmd_parse_cdb(struct se_cmd *);
 void	target_submit_cmd(struct se_cmd *, struct se_session *, unsigned char *,
 		unsigned char *, u64, u32, int, int, int);
-void	target_queue_submission(struct se_cmd *se_cmd);
 
 int	target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
 		unsigned char *sense, u64 unpacked_lun,
-- 
2.34.1




[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