]> Pileus Git - ~andy/linux/blobdiff - fs/jffs2/super.c
Merge tag 'tty-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[~andy/linux] / fs / jffs2 / super.c
index 61ea41389f90d91d8b3ab6a6a39cd580720f1950..d3d8799e2187233e23e1614990443203d4fff1ad 100644 (file)
@@ -100,6 +100,10 @@ static int jffs2_sync_fs(struct super_block *sb, int wait)
 {
        struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
 
+#ifdef CONFIG_JFFS2_FS_WRITEBUFFER
+       cancel_delayed_work_sync(&c->wbuf_dwork);
+#endif
+
        mutex_lock(&c->alloc_sem);
        jffs2_flush_wbuf_pad(c);
        mutex_unlock(&c->alloc_sem);
@@ -418,6 +422,12 @@ static void __exit exit_jffs2_fs(void)
        unregister_filesystem(&jffs2_fs_type);
        jffs2_destroy_slab_caches();
        jffs2_compressors_exit();
+
+       /*
+        * Make sure all delayed rcu free inodes are flushed before we
+        * destroy cache.
+        */
+       rcu_barrier();
        kmem_cache_destroy(jffs2_inode_cachep);
 }