vserver 1.9.3
[linux-2.6.git] / fs / jffs2 / super.c
index b657c55..257a06e 100644 (file)
@@ -7,7 +7,7 @@
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: super.c,v 1.90 2003/10/11 11:47:23 dwmw2 Exp $
+ * $Id: super.c,v 1.99 2004/08/24 07:59:57 dwmw2 Exp $
  *
  */
 
@@ -24,6 +24,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/ctype.h>
 #include <linux/namei.h>
+#include "compr.h"
 #include "nodelist.h"
 
 static void jffs2_put_super(struct super_block *);
@@ -129,7 +130,7 @@ static struct super_block *jffs2_get_sb_mtd(struct file_system_type *fs_type,
                  mtd->index, mtd->name));
 
        sb->s_op = &jffs2_super_operations;
-       sb->s_flags |= MS_NOATIME;
+       sb->s_flags = flags | MS_NOATIME;
 
        ret = jffs2_do_fill_super(sb, data, (flags&MS_VERBOSE)?1:0);
 
@@ -266,7 +267,7 @@ static void jffs2_put_super (struct super_block *sb)
        jffs2_free_ino_caches(c);
        jffs2_free_raw_node_refs(c);
        kfree(c->blocks);
-       jffs2_nand_flash_cleanup(c);
+       jffs2_flash_cleanup(c);
        kfree(c->inocache_list);
        if (c->mtd->sync)
                c->mtd->sync(c->mtd);
@@ -294,28 +295,28 @@ static int __init init_jffs2_fs(void)
        int ret;
 
        printk(KERN_INFO "JFFS2 version 2.2."
-#ifdef CONFIG_FS_JFFS2_NAND
+#ifdef CONFIG_JFFS2_FS_NAND
               " (NAND)"
 #endif
               " (C) 2001-2003 Red Hat, Inc.\n");
 
        jffs2_inode_cachep = kmem_cache_create("jffs2_i",
                                             sizeof(struct jffs2_inode_info),
-                                            0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
+                                            0, SLAB_RECLAIM_ACCOUNT,
                                             jffs2_i_init_once, NULL);
        if (!jffs2_inode_cachep) {
                printk(KERN_ERR "JFFS2 error: Failed to initialise inode cache\n");
                return -ENOMEM;
        }
-       ret = jffs2_zlib_init();
+       ret = jffs2_compressors_init();
        if (ret) {
-               printk(KERN_ERR "JFFS2 error: Failed to initialise zlib workspaces\n");
+               printk(KERN_ERR "JFFS2 error: Failed to initialise compressors\n");
                goto out;
        }
        ret = jffs2_create_slab_caches();
        if (ret) {
                printk(KERN_ERR "JFFS2 error: Failed to initialise slab caches\n");
-               goto out_zlib;
+               goto out_compressors;
        }
        ret = register_filesystem(&jffs2_fs_type);
        if (ret) {
@@ -326,9 +327,10 @@ static int __init init_jffs2_fs(void)
 
  out_slab:
        jffs2_destroy_slab_caches();
- out_zlib:
-       jffs2_zlib_exit();
+ out_compressors:
+       jffs2_compressors_exit();
  out:
+       kmem_cache_destroy(jffs2_inode_cachep);
        return ret;
 }
 
@@ -336,7 +338,7 @@ static void __exit exit_jffs2_fs(void)
 {
        unregister_filesystem(&jffs2_fs_type);
        jffs2_destroy_slab_caches();
-       jffs2_zlib_exit();
+       jffs2_compressors_exit();
        kmem_cache_destroy(jffs2_inode_cachep);
 }