- patches.fixes/patch-2.6.11-rc1: 2.6.11-rc1.
[linux-flexiantxendom0-3.2.10.git] / fs / jffs2 / super.c
index 678f7c9..6b2a441 100644 (file)
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: super.c,v 1.102 2004/11/12 02:42:17 tpoynor Exp $
+ * $Id: super.c,v 1.104 2004/11/23 15:37:31 gleixner Exp $
  *
  */
 
@@ -277,7 +277,10 @@ static void jffs2_put_super (struct super_block *sb)
        up(&c->alloc_sem);
        jffs2_free_ino_caches(c);
        jffs2_free_raw_node_refs(c);
-       kfree(c->blocks);
+       if (c->mtd->flags & MTD_NO_VIRTBLOCKS)
+               vfree(c->blocks);
+       else
+               kfree(c->blocks);
        jffs2_flash_cleanup(c);
        kfree(c->inocache_list);
        if (c->mtd->sync)