]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/gfs2/main.c
Merge branch 'master'
[karo-tx-linux.git] / fs / gfs2 / main.c
index 0c60f2b10fddd47ca823eaadd8bab2193dfe4c7c..c8d17b7ba60b264a7ace5ebc98f54a7d7efad92b 100644 (file)
 #include <linux/buffer_head.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/gfs2_ondisk.h>
 #include <asm/semaphore.h>
 
 #include "gfs2.h"
+#include "lm_interface.h"
+#include "incore.h"
 #include "ops_fstype.h"
 #include "sys.h"
+#include "util.h"
 
 /**
  * init_gfs2_fs - Register GFS2 as a filesystem
@@ -60,11 +64,17 @@ static int __init init_gfs2_fs(void)
        if (error)
                goto fail;
 
+       error = register_filesystem(&gfs2meta_fs_type);
+       if (error)
+               goto fail_unregister;
+
        printk("GFS2 (built %s %s) installed\n", __DATE__, __TIME__);
 
        return 0;
 
- fail:
+fail_unregister:
+       unregister_filesystem(&gfs2_fs_type);
+fail:
        if (gfs2_bufdata_cachep)
                kmem_cache_destroy(gfs2_bufdata_cachep);
 
@@ -86,6 +96,7 @@ static int __init init_gfs2_fs(void)
 static void __exit exit_gfs2_fs(void)
 {
        unregister_filesystem(&gfs2_fs_type);
+       unregister_filesystem(&gfs2meta_fs_type);
 
        kmem_cache_destroy(gfs2_bufdata_cachep);
        kmem_cache_destroy(gfs2_inode_cachep);