summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArtem B. Bityutskiy <dedekind@infradead.org>2005-07-18 13:21:23 +0200
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 16:31:04 +0100
commit6dac02a5e1bba0bb88ece50160fc4a64cccf30d1 (patch)
tree68645a9df3dd236bc1f2a336f6c2c1657d366bb1 /fs
parent[JFFS2] Debug code clean up - step 2 (diff)
downloadlinux-6dac02a5e1bba0bb88ece50160fc4a64cccf30d1.tar.xz
linux-6dac02a5e1bba0bb88ece50160fc4a64cccf30d1.zip
[JFFS2] Fix slab panic
When JFFS22 is unable to read the root inode, the bad root inode object is not freed and remains sticked in the jffs2_i slab cache. When we further try to free the slab cache (e.g., on rmmod jffs2), slab allocator subsystem panics. Fix this bug. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to '')
-rw-r--r--fs/jffs2/fs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index 934c9f5090c8..a6661e8be25a 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: fs.c,v 1.58 2005/07/17 12:01:42 dedekind Exp $
+ * $Id: fs.c,v 1.59 2005/07/18 11:21:19 dedekind Exp $
*
*/
@@ -517,7 +517,7 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
root_i = iget(sb, 1);
if (is_bad_inode(root_i)) {
D1(printk(KERN_WARNING "get root inode failed\n"));
- goto out_nodes;
+ goto out_root_i;
}
D1(printk(KERN_DEBUG "jffs2_do_fill_super(): d_alloc_root()\n"));
@@ -535,7 +535,6 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
out_root_i:
iput(root_i);
- out_nodes:
jffs2_free_ino_caches(c);
jffs2_free_raw_node_refs(c);
if (c->mtd->flags & MTD_NO_VIRTBLOCKS)