mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
scsi: target: core: Kill transport_handle_cdb_direct()
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>
This commit is contained in:
parent
5c48a4ea32
commit
428926796e
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 @@ int target_submit_prep(struct se_cmd *se_cmd, unsigned char *cdb,
|
||||
}
|
||||
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
|
||||
*
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user