From: pschwan Date: Wed, 30 Oct 2002 21:59:59 +0000 (+0000) Subject: b=300 X-Git-Tag: 0.5.16~64 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=f26c03bf3aefccbd909e0acb9c9684007d5edc3a;p=fs%2Flustre-release.git b=300 MDT wasn't calling 'unregister_type'; fixed --- diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 87f2cec..5096bd1 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1511,6 +1511,7 @@ static void __exit mds_exit(void) { ldlm_unregister_intent(); class_unregister_type(LUSTRE_MDS_NAME); + class_unregister_type(LUSTRE_MDT_NAME); if (kmem_cache_destroy(mds_file_cache)) CERROR("couldn't free MDS file cache\n"); } diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 9279dc1..f188f74 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -165,6 +165,8 @@ int class_register_type(struct obd_ops *ops, char *nm) if (!type) RETURN(-ENOMEM); INIT_LIST_HEAD(&type->typ_chain); + CDEBUG(D_INFO, "MOD_INC_USE for register_type: count = %d\n", + atomic_read(&(THIS_MODULE)->uc.usecount)); MOD_INC_USE_COUNT; list_add(&type->typ_chain, &obd_types); memcpy(type->typ_ops, ops, sizeof(*type->typ_ops)); @@ -196,6 +198,8 @@ int class_unregister_type(char *nm) if (type->typ_ops != NULL) OBD_FREE(type->typ_ops, sizeof(*type->typ_ops)); OBD_FREE(type, sizeof(*type)); + CDEBUG(D_INFO, "MOD_DEC_USE for register_type: count = %d\n", + atomic_read(&(THIS_MODULE)->uc.usecount) - 1); MOD_DEC_USE_COUNT; RETURN(0); } /* class_unregister_type */