From: Liang Zhen Date: Thu, 17 May 2012 10:35:49 +0000 (+0800) Subject: LU-1417 lov: device type finalized twice X-Git-Tag: 2.2.55~53 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=5ff22bfc8ba95e3ce14a351a9a9c15a95ed7ee6f;p=fs%2Flustre-release.git LU-1417 lov: device type finalized twice 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 Change-Id: I12dea692f4d2bdd75bb1640b71c6dcc392b94478 Reviewed-on: http://review.whamcloud.com/2823 Tested-by: Hudson Reviewed-by: Fan Yong Reviewed-by: Jinshan Xiong Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 4489ab1..1c15eb2 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -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. "); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 0c4084d..ba5946b 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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. ");