target: Call missing list_del() for demo-mode MappedLUN disable
Subsystems (2)
PATCH 1/1 target: Call missing list_del() for demo-mode MappedLUN disable
From: Nicholas Bellinger <[email protected]>
This patch fixes a v4.0 specific bug that was not properly addressed in commit 31dd8f6971ad:
commit 31dd8f6971ad62f4a849d98cafecf23675575e88
Author: Nicholas Bellinger <[email protected]> Date: Sun Jan 16 20:50:54 2011 -0800
target: Fix demo-mode MappedLUN shutdown UA/PR breakage
The main point is that list_del(&deve->alua_port_list); *must* be called via core_update_device_list_for_node() for each demo-mode struct se_node_acl specific MappedLUN that is being disabled when a dynamic struct se_node_acl->device_list[] is being released in core_free_device_list_for_node().
Reported-by John Hawley <[email protected]>
Signed-off-by Nicholas A. Bellinger <[email protected]>
--- drivers/target/target_core_device.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
drivers/target/target_core_device.c +5 -6
@@ -369,15 +369,14 @@ int core_update_device_list_for_node(/* * deve->se_lun_acl will be NULL for demo-mode created LUNs * that have not been explictly concerted to MappedLUNs -> -* struct se_lun_acl. This means that active UAs and +* struct se_lun_acl, but we remove deve->alua_port_list from +* port->sep_alua_list. This also means that active UAs and * NodeACL context specific PR metadata for demo-mode * MappedLUN *deve will be released below.. */ -if (deve->se_lun_acl !=NULL ) { -spin_lock_bh (&port->sep_alua_lock); -list_del (&deve->alua_port_list); -spin_unlock_bh (&port->sep_alua_lock); - } +spin_lock_bh (&port->sep_alua_lock); +list_del (&deve->alua_port_list); +spin_unlock_bh (&port->sep_alua_lock); }spin_lock_irq (&nacl->device_list_lock);
Signature · 1 line
1.5.6.5