@@ -500,7 +500,7 @@ int core_tpg_del_initiator_node_acl(
if (acl->dynamic_node_acl) {
acl->dynamic_node_acl = 0;
}
- list_del(&acl->acl_list);
+ list_del_init(&acl->acl_list);
tpg->num_node_acls--;
spin_unlock_irq(&tpg->acl_node_lock);
@@ -801,7 +801,7 @@ int core_tpg_deregister(struct se_portal_group *se_tpg)
spin_lock_irq(&se_tpg->acl_node_lock);
list_for_each_entry_safe(nacl, nacl_tmp, &se_tpg->acl_node_list,
acl_list) {
- list_del(&nacl->acl_list);
+ list_del_init(&nacl->acl_list);
se_tpg->num_node_acls--;
spin_unlock_irq(&se_tpg->acl_node_lock);
@@ -457,7 +457,7 @@ static void target_complete_nacl(struct kref *kref)
}
spin_lock_irqsave(&se_tpg->acl_node_lock, flags);
- list_del(&nacl->acl_list);
+ list_del_init(&nacl->acl_list);
se_tpg->num_node_acls--;
spin_unlock_irqrestore(&se_tpg->acl_node_lock, flags);
@@ -530,7 +530,7 @@ void transport_free_session(struct se_session *se_sess)
spin_unlock(&se_nacl->nacl_sess_lock);
if (se_nacl->dynamic_stop)
- list_del(&se_nacl->acl_list);
+ list_del_init(&se_nacl->acl_list);
}
spin_unlock_irqrestore(&se_tpg->acl_node_lock, flags);