aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tpg.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2012-05-11 01:05:49 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-05-11 17:55:19 -0400
commitcfebf8f42f47327fa54cf05c19b98f4bd5236a26 (patch)
tree6885aaed332ffc132f8de40d91f43364343a9415 /drivers/target/target_core_tpg.c
parent06383f10c49f507220594a455c6491ca6f8c94ab (diff)
target: Drop incorrect se_lun_acl release for dynamic -> explict ACL conversion
This patch removes some potentially problematic legacy code within core_clear_initiator_node_from_tpg() that was originally intended to release left over se_lun_acl setup during dynamic NodeACL+MappedLUN generate when running with TPG demo-mode operation. Since we now only ever expect to allocate and release se_lun_acl from within target_core_fabric_configfs.c:target_fabric_make_mappedlun() and target_fabric_drop_mappedlun() context respectively, this code for demo-mode release is incorrect and needs to be removed. Cc: Christoph Hellwig <hch@lst.de> Cc: Andy Grover <agrover@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_tpg.c')
-rw-r--r--drivers/target/target_core_tpg.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index 70c3ffb981e7..e320ec24aa1b 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -60,7 +60,6 @@ static void core_clear_initiator_node_from_tpg(
60 int i; 60 int i;
61 struct se_dev_entry *deve; 61 struct se_dev_entry *deve;
62 struct se_lun *lun; 62 struct se_lun *lun;
63 struct se_lun_acl *acl, *acl_tmp;
64 63
65 spin_lock_irq(&nacl->device_list_lock); 64 spin_lock_irq(&nacl->device_list_lock);
66 for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) { 65 for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) {
@@ -81,28 +80,7 @@ static void core_clear_initiator_node_from_tpg(
81 core_update_device_list_for_node(lun, NULL, deve->mapped_lun, 80 core_update_device_list_for_node(lun, NULL, deve->mapped_lun,
82 TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0); 81 TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0);
83 82
84 spin_lock(&lun->lun_acl_lock);
85 list_for_each_entry_safe(acl, acl_tmp,
86 &lun->lun_acl_list, lacl_list) {
87 if (!strcmp(acl->initiatorname, nacl->initiatorname) &&
88 (acl->mapped_lun == deve->mapped_lun))
89 break;
90 }
91
92 if (!acl) {
93 pr_err("Unable to locate struct se_lun_acl for %s,"
94 " mapped_lun: %u\n", nacl->initiatorname,
95 deve->mapped_lun);
96 spin_unlock(&lun->lun_acl_lock);
97 spin_lock_irq(&nacl->device_list_lock);
98 continue;
99 }
100
101 list_del(&acl->lacl_list);
102 spin_unlock(&lun->lun_acl_lock);
103
104 spin_lock_irq(&nacl->device_list_lock); 83 spin_lock_irq(&nacl->device_list_lock);
105 kfree(acl);
106 } 84 }
107 spin_unlock_irq(&nacl->device_list_lock); 85 spin_unlock_irq(&nacl->device_list_lock);
108} 86}