target: simplify core_tmr_abort_task
authorJoern Engel <joern@logfs.org>
Tue, 16 Sep 2014 20:23:13 +0000 (16:23 -0400)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 1 Oct 2014 21:39:10 +0000 (14:39 -0700)
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>
drivers/target/target_core_tmr.c

index 83de7aec4aac4466ed9a8d9bcf532e05a8faee47..fa5e157db47be242f855a9c1a209ea9e08e60c3d 100644 (file)
@@ -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;