Whamcloud - gitweb
b=300
authorpschwan <pschwan>
Wed, 30 Oct 2002 21:59:59 +0000 (21:59 +0000)
committerpschwan <pschwan>
Wed, 30 Oct 2002 21:59:59 +0000 (21:59 +0000)
MDT wasn't calling 'unregister_type'; fixed

lustre/mds/handler.c
lustre/obdclass/genops.c

index 87f2cec..5096bd1 100644 (file)
@@ -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");
 }
index 9279dc1..f188f74 100644 (file)
@@ -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 */