Whamcloud - gitweb
LU-458 debug: use profilenm before running class_del_profile() v1_8_8_WC1_RC2
authorYu Jian <yujian@whamcloud.com>
Wed, 16 May 2012 04:57:41 +0000 (12:57 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 18 May 2012 20:13:46 +0000 (16:13 -0400)
This patch fixes the defect in ll_put_super() which uses profilenm
after running class_del_profile(profilenm).

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ida357c6c970f3b6bf1bbe0060a71d17e65323aa2
Reviewed-on: http://review.whamcloud.com/2799
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/llite/llite_lib.c

index f540634..a83a06b 100644 (file)
@@ -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;