]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: target: core: Kill transport_handle_cdb_direct()
authorMike Christie <michael.christie@oracle.com>
Thu, 28 Sep 2023 02:09:04 +0000 (21:09 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 13 Oct 2023 19:53:58 +0000 (15:53 -0400)
Move the code from transport_handle_cdb_direct() to target_submit() and
have iSCSI call target_submit().

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230928020907.5730-5-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/iscsi/iscsi_target_erl1.c
drivers/target/iscsi/iscsi_target_tmr.c
drivers/target/target_core_transport.c
include/target/target_core_fabric.h

index f460a66c0e7c504132898dc2f77bb850aecd0111..6797200211836d5966027f236fd7f7d06c53821f 100644 (file)
@@ -948,7 +948,7 @@ int iscsit_execute_cmd(struct iscsit_cmd *cmd, int ooo)
 
                        iscsit_set_unsolicited_dataout(cmd);
                }
-               return transport_handle_cdb_direct(&cmd->se_cmd);
+               return target_submit(&cmd->se_cmd);
 
        case ISCSI_OP_NOOP_OUT:
        case ISCSI_OP_TEXT:
index afc801f255f5d361c5b12bae6ae397210ab4b9b2..9c4aa01b6351b5b578705e16ee0985af0e75fa03 100644 (file)
@@ -318,7 +318,7 @@ static int iscsit_task_reassign_complete_read(
                pr_debug("READ ITT: 0x%08x: t_state: %d never sent to"
                        " transport\n", cmd->init_task_tag,
                        cmd->se_cmd.t_state);
-               transport_handle_cdb_direct(se_cmd);
+               target_submit(se_cmd);
                return 0;
        }
 
index 3cb0aa798d7339b9fa89efa4cd6ea87cae17ed31..6c8f6055fc1e68535dafbdc39de7140a29a0bf36 100644 (file)
@@ -1575,12 +1575,14 @@ target_cmd_parse_cdb(struct se_cmd *cmd)
 }
 EXPORT_SYMBOL(target_cmd_parse_cdb);
 
-/*
- * Used by fabric module frontends to queue tasks directly.
- * May only be used from process context.
+/**
+ * target_submit - perform final initialization and submit cmd to LIO core
+ * @cmd: command descriptor to submit
+ *
+ * target_submit_prep or something similar must have been called on the cmd,
+ * and this must be called from process context.
  */
-int transport_handle_cdb_direct(
-       struct se_cmd *cmd)
+int target_submit(struct se_cmd *cmd)
 {
        sense_reason_t ret;
 
@@ -1640,7 +1642,7 @@ int transport_handle_cdb_direct(
                transport_generic_request_failure(cmd, ret);
        return 0;
 }
-EXPORT_SYMBOL(transport_handle_cdb_direct);
+EXPORT_SYMBOL_GPL(target_submit);
 
 sense_reason_t
 transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *sgl,
@@ -1807,19 +1809,6 @@ generic_fail:
 }
 EXPORT_SYMBOL_GPL(target_submit_prep);
 
-/**
- * target_submit - perform final initialization and submit cmd to LIO core
- * @se_cmd: command descriptor to submit
- *
- * target_submit_prep must have been called on the cmd, and this must be
- * called from process context.
- */
-void target_submit(struct se_cmd *se_cmd)
-{
-       transport_handle_cdb_direct(se_cmd);
-}
-EXPORT_SYMBOL_GPL(target_submit);
-
 /**
  * target_submit_cmd - lookup unpacked lun and submit uninitialized se_cmd
  *
index e5fcfb84552915a1ad78a32cd11b1731208145c2..a808c3c32004da75e4cbf16ceaf0c9b198f8e33f 100644 (file)
@@ -175,7 +175,7 @@ int target_submit_prep(struct se_cmd *se_cmd, unsigned char *cdb,
                struct scatterlist *sgl, u32 sgl_count,
                struct scatterlist *sgl_bidi, u32 sgl_bidi_count,
                struct scatterlist *sgl_prot, u32 sgl_prot_count, gfp_t gfp);
-void   target_submit(struct se_cmd *se_cmd);
+int    target_submit(struct se_cmd *se_cmd);
 sense_reason_t transport_lookup_cmd_lun(struct se_cmd *);
 sense_reason_t target_cmd_init_cdb(struct se_cmd *se_cmd, unsigned char *cdb,
                                   gfp_t gfp);
@@ -188,7 +188,6 @@ int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
                unsigned char *sense, u64 unpacked_lun,
                void *fabric_tmr_ptr, unsigned char tm_type,
                gfp_t, u64, int);
-int    transport_handle_cdb_direct(struct se_cmd *);
 sense_reason_t transport_generic_new_cmd(struct se_cmd *);
 
 void   target_put_cmd_and_wait(struct se_cmd *cmd);