diff options
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_device.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 6b423485c5d6..ea9617c7b403 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c | |||
@@ -351,7 +351,15 @@ int core_enable_device_list_for_node( | |||
351 | kfree(new); | 351 | kfree(new); |
352 | return -EINVAL; | 352 | return -EINVAL; |
353 | } | 353 | } |
354 | BUG_ON(orig->se_lun_acl != NULL); | 354 | if (orig->se_lun_acl != NULL) { |
355 | pr_warn_ratelimited("Detected existing explicit" | ||
356 | " se_lun_acl->se_lun_group reference for %s" | ||
357 | " mapped_lun: %llu, failing\n", | ||
358 | nacl->initiatorname, mapped_lun); | ||
359 | mutex_unlock(&nacl->lun_entry_mutex); | ||
360 | kfree(new); | ||
361 | return -EINVAL; | ||
362 | } | ||
355 | 363 | ||
356 | rcu_assign_pointer(new->se_lun, lun); | 364 | rcu_assign_pointer(new->se_lun, lun); |
357 | rcu_assign_pointer(new->se_lun_acl, lun_acl); | 365 | rcu_assign_pointer(new->se_lun_acl, lun_acl); |