static int __init cmm_mod_init(void)
{
struct lprocfs_static_vars lvars;
+ int rc;
+
+ /*
+ * Kludge code : it should be moved mdc_device.c if mdc_(mds)_device
+ * is really stacked.
+ */
+ rc = lu_device_type_init(&mdc_device_type);
+ if (rc)
+ return rc;
lprocfs_cmm_init_vars(&lvars);
- return class_register_type(&cmm_obd_device_ops, NULL, lvars.module_vars,
- LUSTRE_CMM_NAME, &cmm_device_type);
+ rc = class_register_type(&cmm_obd_device_ops, NULL, lvars.module_vars,
+ LUSTRE_CMM_NAME, &cmm_device_type);
+ if (rc)
+ lu_device_type_fini(&mdc_device_type);
+
+ return rc;
}
static void __exit cmm_mod_exit(void)
{
class_unregister_type(LUSTRE_CMM_NAME);
+ lu_device_type_fini(&mdc_device_type);
}
MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
{
LINVRNT(ctx->lc_state == LCS_ENTERED);
LINVRNT(0 <= key->lct_index && key->lct_index < ARRAY_SIZE(lu_keys));
+ LASSERT(lu_keys[key->lct_index] == key);
return ctx->lc_value[key->lct_index];
}
EXPORT_SYMBOL(lu_context_key_get);