summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tmr.c
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2014-09-16 16:23:13 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2014-10-01 14:39:10 -0700
commitf81ccb489a7a641c1bed41b49cf8d72c199c68d5 (patch)
tree8ab987efb52a2495bafdcc399f465ae15c47ae7a /drivers/target/target_core_tmr.c
parent33940d09937276cd3c81f2874faf43e37c2db0e2 (diff)
downloadlinux-stable-f81ccb489a7a641c1bed41b49cf8d72c199c68d5.tar.gz
linux-stable-f81ccb489a7a641c1bed41b49cf8d72c199c68d5.tar.bz2
linux-stable-f81ccb489a7a641c1bed41b49cf8d72c199c68d5.zip
target: simplify core_tmr_abort_task
list_for_each_entry_safe is necessary if list objects are deleted from the list while traversing it. Not the case here, so we can use the base list_for_each_entry variant. Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_tmr.c')
-rw-r--r--drivers/target/target_core_tmr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
index 83de7aec4aac..fa5e157db47b 100644
--- a/drivers/target/target_core_tmr.c
+++ b/drivers/target/target_core_tmr.c
@@ -115,13 +115,12 @@ void core_tmr_abort_task(
struct se_tmr_req *tmr,
struct se_session *se_sess)
{
- struct se_cmd *se_cmd, *tmp_cmd;
+ struct se_cmd *se_cmd;
unsigned long flags;
int ref_tag;
spin_lock_irqsave(&se_sess->sess_cmd_lock, flags);
- list_for_each_entry_safe(se_cmd, tmp_cmd,
- &se_sess->sess_cmd_list, se_cmd_list) {
+ list_for_each_entry(se_cmd, &se_sess->sess_cmd_list, se_cmd_list) {
if (dev != se_cmd->se_dev)
continue;