if (type == NULL)
RETURN(-ENOMEM);
+ type->typ_lu = ldt ? OBD_LU_TYPE_SETUP : NULL;
type->typ_kobj.kset = lustre_kset;
kobject_init(&type->typ_kobj, &class_ktype);
#ifdef HAVE_SERVER_SUPPORT
setup_ldt:
#endif
if (ldt) {
- type->typ_lu = ldt;
rc = lu_device_type_init(ldt);
+ smp_store_release(&type->typ_lu, rc ? NULL : ldt);
+ wake_up_var(&type->typ_lu);
if (rc)
GOTO(failed, rc);
}