X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fgenops.c;h=97672f979638d865bd533239f90d9286c75e9c4f;hp=75388ed2e5dee96d9fa18002f7462795c97faeae;hb=e4fd618ff498814145002b2c3f56746b3d172e07;hpb=3fe77a129e131014ff654bde616a62a1e243e322 diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 75388ed..97672f9 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -251,6 +251,7 @@ int class_register_type(const struct obd_ops *dt_ops, 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 @@ -289,8 +290,9 @@ dir_exist: 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); }