Whamcloud - gitweb
LU-1417 lov: device type finalized twice
authorLiang Zhen <liang@whamcloud.com>
Thu, 17 May 2012 10:35:49 +0000 (18:35 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 30 May 2012 11:51:46 +0000 (07:51 -0400)
lov_exit and osc_exit explicitly called lu_device_type_fini() right
before calling class_unregister_type().

However class_unregister_type() will call lu_device_type_fini() too,
which means lov_device_type and osc_device_type will be finalized
twice.

This can be fixed by removing lu_device_type_fini() calls from
lov_exit and osc_exit.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I12dea692f4d2bdd75bb1640b71c6dcc392b94478
Reviewed-on: http://review.whamcloud.com/2823
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lov_obd.c
lustre/osc/osc_request.c

index 4489ab1..1c15eb2 100644 (file)
@@ -3083,15 +3083,14 @@ static void /*__exit*/ lov_exit(void)
 {
         int rc;
 
-        lu_device_type_fini(&lov_device_type);
-        lu_kmem_fini(lov_caches);
-
         if (quota_interface)
                 PORTAL_SYMBOL_PUT(lov_quota_interface);
 
         class_unregister_type(LUSTRE_LOV_NAME);
         rc = cfs_mem_cache_destroy(lov_oinfo_slab);
         LASSERT(rc == 0);
+
+       lu_kmem_fini(lov_caches);
 }
 
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
index 0c4084d..ba5946b 100644 (file)
@@ -4722,11 +4722,9 @@ int __init osc_init(void)
 #ifdef __KERNEL__
 static void /*__exit*/ osc_exit(void)
 {
-        lu_device_type_fini(&osc_device_type);
-
-        osc_quota_exit();
-        class_unregister_type(LUSTRE_OSC_NAME);
-        lu_kmem_fini(osc_caches);
+       osc_quota_exit();
+       class_unregister_type(LUSTRE_OSC_NAME);
+       lu_kmem_fini(osc_caches);
 }
 
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");