Skip to content

Commit

Permalink
target: remove transport_generic_process_write
Browse files Browse the repository at this point in the history
Just call target_execute_cmd directly.  Also, convert loopback, sbp,
usb-gadget to use the newly exported target_execute_cmd().

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Christoph Hellwig authored and Nicholas Bellinger committed Jul 17, 2012
1 parent f7113a4 commit 70baf0a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion drivers/target/loopback/tcm_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ static int tcm_loop_write_pending(struct se_cmd *se_cmd)
* We now tell TCM to add this WRITE CDB directly into the TCM storage
* object execution queue.
*/
transport_generic_process_write(se_cmd);
target_execute_cmd(se_cmd);
return 0;
}

Expand Down
3 changes: 1 addition & 2 deletions drivers/target/sbp/sbp_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -1784,8 +1784,7 @@ static int sbp_write_pending(struct se_cmd *se_cmd)
return ret;
}

transport_generic_process_write(se_cmd);

target_execute_cmd(se_cmd);
return 0;
}

Expand Down
15 changes: 3 additions & 12 deletions drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,7 @@ static void __target_execute_cmd(struct se_cmd *cmd)
}
}

static void target_execute_cmd(struct se_cmd *cmd)
void target_execute_cmd(struct se_cmd *cmd)
{
struct se_device *dev = cmd->se_dev;

Expand Down Expand Up @@ -1950,6 +1950,7 @@ static void target_execute_cmd(struct se_cmd *cmd)
*/
__target_execute_cmd(cmd);
}
EXPORT_SYMBOL(target_execute_cmd);

/*
* Used to obtain Sense Data from underlying Linux/SCSI struct scsi_cmnd
Expand Down Expand Up @@ -2500,16 +2501,6 @@ int transport_generic_new_cmd(struct se_cmd *cmd)
}
EXPORT_SYMBOL(transport_generic_new_cmd);

/* transport_generic_process_write():
*
*
*/
void transport_generic_process_write(struct se_cmd *cmd)
{
target_execute_cmd(cmd);
}
EXPORT_SYMBOL(transport_generic_process_write);

static void transport_write_pending_qf(struct se_cmd *cmd)
{
int ret;
Expand Down Expand Up @@ -3321,7 +3312,7 @@ static int transport_processing_thread(void *param)
}
break;
case TRANSPORT_PROCESS_WRITE:
transport_generic_process_write(cmd);
target_execute_cmd(cmd);
break;
case TRANSPORT_PROCESS_TMR:
transport_generic_do_tmr(cmd);
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/gadget/tcm_usb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static int bot_send_write_request(struct usbg_cmd *cmd)
pr_err("%s(%d)\n", __func__, __LINE__);

wait_for_completion(&cmd->write_complete);
transport_generic_process_write(se_cmd);
target_execute_cmd(se_cmd);
cleanup:
return ret;
}
Expand Down Expand Up @@ -725,7 +725,7 @@ static int uasp_send_write_request(struct usbg_cmd *cmd)
}

wait_for_completion(&cmd->write_complete);
transport_generic_process_write(se_cmd);
target_execute_cmd(se_cmd);
cleanup:
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion include/target/target_core_fabric.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int transport_generic_map_mem_to_cmd(struct se_cmd *cmd,
struct scatterlist *, u32, struct scatterlist *, u32);
int transport_generic_new_cmd(struct se_cmd *);

void transport_generic_process_write(struct se_cmd *);
void target_execute_cmd(struct se_cmd *cmd);

void transport_generic_free_cmd(struct se_cmd *, int);

Expand Down

0 comments on commit 70baf0a

Please sign in to comment.