*
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: super.c,v 1.105 2005/02/09 09:23:54 pavlov Exp $
+ * $Id: super.c,v 1.106 2005/05/18 11:37:25 dedekind Exp $
  *
  */
 
 
        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);
 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);