Merge tag 'v3.10.108' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / target / target_core_fabric_configfs.c
index 04c775cb3e65ec9a3905d19c34dfea33f28c5705..179f7810d39824f99fcce410079ca419721b3239 100644 (file)
@@ -84,6 +84,11 @@ static int target_fabric_mappedlun_link(
                                "_tpg does not exist\n");
                return -EINVAL;
        }
+       if (lun->lun_shutdown) {
+               pr_err("Unable to create mappedlun symlink because"
+                       " lun->lun_shutdown=true\n");
+               return -EINVAL;
+       }
        se_tpg = lun->lun_sep->sep_tpg;
 
        nacl_ci = &lun_acl_ci->ci_parent->ci_group->cg_item;