From 5ff22bfc8ba95e3ce14a351a9a9c15a95ed7ee6f Mon Sep 17 00:00:00 2001 From: Liang Zhen Date: Thu, 17 May 2012 18:35:49 +0800 Subject: [PATCH] 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 --- lustre/lov/lov_obd.c | 5 ++--- lustre/osc/osc_request.c | 8 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) 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. "); -- 1.8.3.1