RE: kernel BUG at fs/jffs2/gc.c:190!

Artem B. Bityuckiy
2005-05-13T06:52:59Z

Ralph,

please try the following patch for fs/jffs2/super.c:

--- super.c 2005-05-13 10:47:50.011432985 +0400
+++ fixed-super.c 2005-05-13 10:47:13.652273817 +0400
@@ -270,8 +270,6 @@

D2(printk(KERN_DEBUG "jffs2: jffs2_put_super()\n"));

- if (!(sb->s_flags & MS_RDONLY))
- jffs2_stop_garbage_collect_thread(c);
down(&c->alloc_sem);
jffs2_flush_wbuf_pad(c);
up(&c->alloc_sem);
@@ -292,6 +290,8 @@
static void jffs2_kill_sb(struct super_block *sb)
{
struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
+ if (!(sb->s_flags & MS_RDONLY))
+ jffs2_stop_garbage_collect_thread(c);
generic_shutdown_super(sb);
put_mtd_device(c->mtd);
kfree(c);