Whamcloud - gitweb
file upcall_cache.c was initially added on branch b1_4_bug3389.
[fs/lustre-release.git] / lustre / llite / super25.c
index 2294551..b5557f1 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/lprocfs_status.h>
+#include <linux/obd_support.h>
 #include "llite_internal.h"
 
 struct super_block * ll_get_sb(struct file_system_type *fs_type,
@@ -97,6 +98,12 @@ void ll_destroy_inodecache(void)
                  "ll_inode_cache: not all structures were freed\n");
 }
 
+static void ll_umount_lustre(struct super_block *sb)
+{
+        struct ll_sb_info *sbi = ll_s2sbi(sb);
+        ll_gns_check_mounts(sbi, LL_GNS_UMOUNT);
+}
+
 /* exported operations */
 struct super_operations lustre_super_operations =
 {
@@ -105,10 +112,10 @@ struct super_operations lustre_super_operations =
         .clear_inode   = ll_clear_inode,
         .put_super     = lustre_put_super,
         .statfs        = ll_statfs,
-        .umount_begin  = ll_umount_begin
+        .umount_begin  = ll_umount_begin,
+        .umount_lustre = ll_umount_lustre
 };
 
-
 struct file_system_type lustre_lite_fs_type = {
         .owner        = THIS_MODULE,
         .name         = "lustre_lite",
@@ -144,9 +151,9 @@ static int __init init_lustre_lite(void)
                 goto out;
         }
         ll_intent_slab = kmem_cache_create("lustre_intent_data",
-                                              sizeof(struct lustre_intent_data),
-                                              0, SLAB_HWCACHE_ALIGN, NULL,
-                                              NULL);
+                                          sizeof(struct lustre_intent_data),
+                                           0, SLAB_HWCACHE_ALIGN, NULL,
+                                           NULL);
         if (ll_intent_slab == NULL) {
                 kmem_cache_destroy(ll_file_data_slab);
                 ll_destroy_inodecache();
@@ -185,11 +192,10 @@ out:
 
 static void __exit exit_lustre_lite(void)
 {
-        ll_gns_stop_thread();
-
         unregister_filesystem(&lustre_fs_type);
         unregister_filesystem(&lustre_lite_fs_type);
 
+        ll_gns_stop_thread();
         ll_destroy_inodecache();
         
         LASSERTF(kmem_cache_destroy(ll_file_data_slab) == 0,