diff options
author | Nicholas Bellinger | 2011-10-09 11:02:51 +0200 |
---|---|---|
committer | Nicholas Bellinger | 2011-10-24 05:20:58 +0200 |
commit | 8dc52b54207f361f7abf6cbe26f5199ae8b7cf23 (patch) | |
tree | 71b328bf052940a44af314b1524a2a7a3765337e /drivers/target/target_core_transport.c | |
parent | iscsi-target: Remove SCF_SE_LUN_CMD flag abuses (diff) | |
download | kernel-qcow2-linux-8dc52b54207f361f7abf6cbe26f5199ae8b7cf23.tar.gz kernel-qcow2-linux-8dc52b54207f361f7abf6cbe26f5199ae8b7cf23.tar.xz kernel-qcow2-linux-8dc52b54207f361f7abf6cbe26f5199ae8b7cf23.zip |
target: Merge transport_cmd_finish_abort_tmr into transport_cmd_finish_abort
This patch merges transport_cmd_finish_abort_tmr() logic into a single
transport_cmd_finish_abort() function by adding a cmd->se_tmr_req check
around transport_lun_remove_cmd(), and updates the single caller within
core_tmr_drain_tmr_list().
Reported-by: Christoph Hellwig <hch@lst.de>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r-- | drivers/target/target_core_transport.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index f8de042e532e..36fb39c2ce03 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -591,7 +591,8 @@ check_lun: void transport_cmd_finish_abort(struct se_cmd *cmd, int remove) { - transport_lun_remove_cmd(cmd); + if (!cmd->se_tmr_req) + transport_lun_remove_cmd(cmd); if (transport_cmd_check_stop_to_fabric(cmd)) return; @@ -601,16 +602,6 @@ void transport_cmd_finish_abort(struct se_cmd *cmd, int remove) } } -void transport_cmd_finish_abort_tmr(struct se_cmd *cmd) -{ - transport_remove_cmd_from_queue(cmd, &cmd->se_dev->dev_queue_obj); - - if (transport_cmd_check_stop_to_fabric(cmd)) - return; - - transport_put_cmd(cmd); -} - static void transport_add_cmd_to_queue( struct se_cmd *cmd, int t_state) |