diff options
author | Christoph Hellwig <hch@lst.de> | 2011-09-13 23:08:19 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-10-24 03:20:31 +0000 |
commit | 2dbc43d256c5371ebc294e3534620663eb80a5ce (patch) | |
tree | f23de858027389d0eaa85a17b35748139d8275b2 /drivers/target | |
parent | 31afc39c0c93edec5a117371f1bd2a264cceafac (diff) | |
download | linux-2dbc43d256c5371ebc294e3534620663eb80a5ce.tar.bz2 |
target: remove transport_free_se_cmd
It is only called by transport_release_cmd, so inline it there. Also add
a kerneldoc comment for transport_release_cmd while we are at it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_transport.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 0c1d004548b1..49df0971a37f 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -1640,19 +1640,6 @@ static int transport_check_alloc_task_attr(struct se_cmd *cmd) return 0; } -void transport_free_se_cmd( - struct se_cmd *se_cmd) -{ - if (se_cmd->se_tmr_req) - core_tmr_release_req(se_cmd->se_tmr_req); - /* - * Check and free any extended CDB buffer that was allocated - */ - if (se_cmd->t_task_cdb != se_cmd->__t_task_cdb) - kfree(se_cmd->t_task_cdb); -} -EXPORT_SYMBOL(transport_free_se_cmd); - static void transport_generic_wait_for_tasks(struct se_cmd *, int, int); /* transport_generic_allocate_tasks(): @@ -4371,11 +4358,21 @@ queue_full: return ret; } +/** + * transport_release_cmd - free a command + * @cmd: command to free + * + * This routine unconditionally frees a command, and reference counting + * or list removal must be done in the caller. + */ void transport_release_cmd(struct se_cmd *cmd) { BUG_ON(!cmd->se_tfo); - transport_free_se_cmd(cmd); + if (cmd->se_tmr_req) + core_tmr_release_req(cmd->se_tmr_req); + if (cmd->t_task_cdb != cmd->__t_task_cdb) + kfree(cmd->t_task_cdb); cmd->se_tfo->release_cmd(cmd); } EXPORT_SYMBOL(transport_release_cmd); |