From 48c2f667236e2f41f9fd0224b5de7a83517b3180 Mon Sep 17 00:00:00 2001 From: Yu Jian Date: Wed, 16 May 2012 12:57:41 +0800 Subject: [PATCH] LU-458 debug: use profilenm before running class_del_profile() This patch fixes the defect in ll_put_super() which uses profilenm after running class_del_profile(profilenm). Signed-off-by: Yu Jian Change-Id: Ida357c6c970f3b6bf1bbe0060a71d17e65323aa2 Reviewed-on: http://review.whamcloud.com/2799 Reviewed-by: Yang Sheng Reviewed-by: Johann Lombardi Tested-by: Hudson Tested-by: Maloo --- lustre/llite/llite_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index f540634..a83a06b 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -1222,9 +1222,6 @@ void ll_put_super(struct super_block *sb) class_manual_cleanup(obd); } - if (profilenm) - class_del_profile(profilenm); - #ifdef HAVE_BDI_INIT if (lsi->lsi_flags & LSI_BDI_INITIALIZED) { bdi_destroy(&lsi->lsi_bdi); @@ -1239,6 +1236,9 @@ void ll_put_super(struct super_block *sb) LCONSOLE_WARN("client %s(%p) umount complete\n", profilenm, sb); + if (profilenm) + class_del_profile(profilenm); + cfs_module_put(); EXIT; -- 1.8.3.1