x86/retpoline/hyperv: Convert assembler indirect jumps
[pandora-kernel.git] / drivers / target / target_core_fabric_configfs.c
index 55bbe08..60009bd 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/version.h>
 #include <generated/utsrelease.h>
 #include <linux/utsname.h>
 #include <linux/init.h>
@@ -355,9 +354,17 @@ static struct config_group *target_fabric_make_mappedlun(
                ret = -EINVAL;
                goto out;
        }
+       if (mapped_lun > (TRANSPORT_MAX_LUNS_PER_TPG-1)) {
+               pr_err("Mapped LUN: %lu exceeds TRANSPORT_MAX_LUNS_PER_TPG"
+                       "-1: %u for Target Portal Group: %u\n", mapped_lun,
+                       TRANSPORT_MAX_LUNS_PER_TPG-1,
+                       se_tpg->se_tpg_tfo->tpg_get_tag(se_tpg));
+               ret = -EINVAL;
+               goto out;
+       }
 
-       lacl = core_dev_init_initiator_node_lun_acl(se_tpg, mapped_lun,
-                       config_item_name(acl_ci), &ret);
+       lacl = core_dev_init_initiator_node_lun_acl(se_tpg, se_nacl,
+                       mapped_lun, &ret);
        if (!lacl) {
                ret = -EINVAL;
                goto out;