diff options
author | Joern Engel <joern@logfs.org> | 2014-09-16 16:23:10 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-10-01 17:38:57 -0400 |
commit | 8f83269048628d7b139dacbfc6cc97befcbdd2e9 (patch) | |
tree | 30663fe59d434ad6ceb2cdcce6e2f5286f84785d /drivers/target | |
parent | 9c7d6154bc4b9dfefd580490cdca5f7c72321464 (diff) |
target: simplify core_tmr_release_req()
And while at it, do minimal coding style fixes in the area.
Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_tmr.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index f7cd95e8111a..83de7aec4aac 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c | |||
@@ -64,21 +64,17 @@ int core_tmr_alloc_req( | |||
64 | } | 64 | } |
65 | EXPORT_SYMBOL(core_tmr_alloc_req); | 65 | EXPORT_SYMBOL(core_tmr_alloc_req); |
66 | 66 | ||
67 | void core_tmr_release_req( | 67 | void core_tmr_release_req(struct se_tmr_req *tmr) |
68 | struct se_tmr_req *tmr) | ||
69 | { | 68 | { |
70 | struct se_device *dev = tmr->tmr_dev; | 69 | struct se_device *dev = tmr->tmr_dev; |
71 | unsigned long flags; | 70 | unsigned long flags; |
72 | 71 | ||
73 | if (!dev) { | 72 | if (dev) { |
74 | kfree(tmr); | 73 | spin_lock_irqsave(&dev->se_tmr_lock, flags); |
75 | return; | 74 | list_del(&tmr->tmr_list); |
75 | spin_unlock_irqrestore(&dev->se_tmr_lock, flags); | ||
76 | } | 76 | } |
77 | 77 | ||
78 | spin_lock_irqsave(&dev->se_tmr_lock, flags); | ||
79 | list_del(&tmr->tmr_list); | ||
80 | spin_unlock_irqrestore(&dev->se_tmr_lock, flags); | ||
81 | |||
82 | kfree(tmr); | 78 | kfree(tmr); |
83 | } | 79 | } |
84 | 80 | ||
@@ -90,9 +86,8 @@ static void core_tmr_handle_tas_abort( | |||
90 | bool remove = true; | 86 | bool remove = true; |
91 | /* | 87 | /* |
92 | * TASK ABORTED status (TAS) bit support | 88 | * TASK ABORTED status (TAS) bit support |
93 | */ | 89 | */ |
94 | if ((tmr_nacl && | 90 | if ((tmr_nacl && (tmr_nacl != cmd->se_sess->se_node_acl)) && tas) { |
95 | (tmr_nacl != cmd->se_sess->se_node_acl)) && tas) { | ||
96 | remove = false; | 91 | remove = false; |
97 | transport_send_task_abort(cmd); | 92 | transport_send_task_abort(cmd); |
98 | } | 93 | } |