X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fjffs2%2Fsuper.c;h=d3d8799e2187233e23e1614990443203d4fff1ad;hb=793388a797ba29cd8baed241301601814f85a308;hp=61ea41389f90d91d8b3ab6a6a39cd580720f1950;hpb=a4d3621e0d3ecf191961dc9214e4a378a7186780;p=~andy%2Flinux diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 61ea41389f9..d3d8799e218 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c @@ -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); }