
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- linux2/fs/jffs2/super.c~rp-jffs2-sync-r0.patch
+++ linux2/fs/jffs2/super.c
@@ -56,6 +56,14 @@
 	}
 }
 
+static int jffs2_sync_fs(struct super_block *sb, int wait)
+{
+ 	struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
+ 	down(&c->alloc_sem);
+ 	jffs2_flush_wbuf_pad(c);
+ 	up(&c->alloc_sem);	
+}
+
 static struct super_operations jffs2_super_operations =
 {
 	.alloc_inode =	jffs2_alloc_inode,
@@ -67,6 +75,7 @@
 	.remount_fs =	jffs2_remount_fs,
 	.clear_inode =	jffs2_clear_inode,
 	.dirty_inode =	jffs2_dirty_inode,
+	.sync_fs	= 	jffs2_sync_fs,
 };
 
 static int jffs2_sb_compare(struct super_block *sb, void *data)

